You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2015/05/31 11:30:39 UTC

[08/10] camel git commit: CAMEL-8774 Remove the System.out.println

CAMEL-8774 Remove the System.out.println


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bad5acfd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bad5acfd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bad5acfd

Branch: refs/heads/camel-2.14.x
Commit: bad5acfde35d9b82bd59261655950b4350af7710
Parents: 221218c
Author: Willem Jiang <wi...@gmail.com>
Authored: Sun May 31 16:58:01 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Sun May 31 17:26:09 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/http4/HttpProducer.java | 13 ++++++-------
 .../camel/component/http4/HttpCompressionTest.java     | 13 ++++++-------
 2 files changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bad5acfd/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
index d969227..4e6d98e 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
@@ -67,7 +67,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @version 
+ * @version
  */
 public class HttpProducer extends DefaultProducer {
     private static final Logger LOG = LoggerFactory.getLogger(HttpProducer.class);
@@ -102,7 +102,7 @@ public class HttpProducer extends DefaultProducer {
             if (queryString != null) {
                 skipRequestHeaders = URISupport.parseQuery(queryString);
             }
-            // Need to remove the Host key as it should be not used 
+            // Need to remove the Host key as it should be not used
             exchange.getIn().getHeaders().remove("host");
         }
         HttpRequestBase httpRequest = createMethod(exchange);
@@ -194,7 +194,6 @@ public class HttpProducer extends DefaultProducer {
         // propagate HTTP response headers
         Header[] headers = httpResponse.getAllHeaders();
         for (Header header : headers) {
-            System.out.println("headers name " + header.getName());
             String name = header.getName();
             String value = header.getValue();
             if (name.toLowerCase().equals("content-type")) {
@@ -210,7 +209,7 @@ public class HttpProducer extends DefaultProducer {
 
         // preserve headers from in by copying any non existing headers
         // to avoid overriding existing headers with old values
-        // Just filter the http protocol headers 
+        // Just filter the http protocol headers
         MessageHelper.copyHeaders(exchange.getIn(), answer, httpProtocolHeaderFilterStrategy, false);
     }
 
@@ -411,19 +410,19 @@ public class HttpProducer extends DefaultProducer {
                 if (data != null) {
                     String contentTypeString = ExchangeHelper.getContentType(exchange);
                     ContentType contentType = null;
-                    
+
                     //Check the contentType is valid or not, If not it throws an exception.
                     //When ContentType.parse parse method parse "multipart/form-data;boundary=---------------------------j2radvtrk",
                     //it removes "boundary" from Content-Type; I have to use contentType.create method.
                     if (contentTypeString != null) {
-                        // using ContentType.parser for charset 
+                        // using ContentType.parser for charset
                         if (contentTypeString.indexOf("charset") > 0) {
                             contentType = ContentType.parse(contentTypeString);
                         } else {
                             contentType = ContentType.create(contentTypeString);
                         }
                     }
-                                        
+
                     if (contentTypeString != null && HttpConstants.CONTENT_TYPE_JAVA_SERIALIZED_OBJECT.equals(contentTypeString)) {
                         // serialized java object
                         Serializable obj = in.getMandatoryBody(Serializable.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/bad5acfd/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpCompressionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpCompressionTest.java b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpCompressionTest.java
index e6d3d9e..e9aba3e 100644
--- a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpCompressionTest.java
+++ b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpCompressionTest.java
@@ -50,8 +50,8 @@ import org.apache.http.util.EntityUtils;
 import org.junit.Test;
 
 /**
- * 
- * @version 
+ *
+ * @version
  */
 public class HttpCompressionTest extends BaseHttpTest {
 
@@ -71,9 +71,8 @@ public class HttpCompressionTest extends BaseHttpTest {
         assertNotNull(out);
 
         Map<String, Object> headers = out.getHeaders();
-        System.out.println(headers);
         assertEquals(HttpStatus.SC_OK, headers.get(Exchange.HTTP_RESPONSE_CODE));
-        
+
         assertBody(out.getBody(String.class));
     }
 
@@ -132,7 +131,7 @@ public class HttpCompressionTest extends BaseHttpTest {
             public long getContentLength() {
                 return -1;
             }
-            
+
             @Override
             public boolean isStreaming() {
                 return false;
@@ -170,11 +169,11 @@ public class HttpCompressionTest extends BaseHttpTest {
             public long getContentLength() {
                 return -1;
             }
-            
+
             @Override
             public boolean isStreaming() {
                 return false;
             }
         }
     }
-}
\ No newline at end of file
+}