You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/06/08 12:28:50 UTC

[3/3] camel git commit: Fixed CS

Fixed CS


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

Branch: refs/heads/master
Commit: 5cd4af715bb5172a09aebe9bae532b5ddebe9b98
Parents: 807ea04
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jun 8 14:22:55 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jun 8 14:28:41 2016 +0200

----------------------------------------------------------------------
 .../apache/camel/component/dozer/DozerEndpoint.java    |  5 +++--
 .../elasticsearch/ElasticsearchConfiguration.java      | 12 ++++++------
 .../netty4/http/NettyHttpOperationFailedException.java | 13 ++++++++-----
 .../camel/component/netty4/http/NettyHttpProducer.java |  4 ++--
 4 files changed, 19 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5cd4af71/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
index 190d1cc..92774b7 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
@@ -167,10 +167,11 @@ public class DozerEndpoint extends DefaultEndpoint {
             BeanContainer.getInstance().setElementReader(reader);
         } finally {
             Thread.currentThread().setContextClassLoader(tccl);
-            if (elprop != null)
+            if (elprop != null) {
                 System.setProperty("javax.el.ExpressionFactory", elprop);
-            else
+            } else {
                 System.clearProperty("javax.el.ExpressionFactory");
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5cd4af71/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
index 6aef4f8..c3bd9e5 100644
--- a/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
+++ b/components/camel-elasticsearch/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
@@ -184,11 +184,11 @@ public class ElasticsearchConfiguration {
     /**
      * The path.home property of ElasticSearch configuration. You need to provide a valid path, otherwise the default, /usr/share/elasticsearch, will be used.
      */
-	public String getPathHome() {
-		return pathHome;
-	}
+    public String getPathHome() {
+        return pathHome;
+    }
 
-	public void setPathHome(String pathHome) {
-		this.pathHome = pathHome;
-	}
+    public void setPathHome(String pathHome) {
+        this.pathHome = pathHome;
+    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/5cd4af71/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedException.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedException.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedException.java
index d75ee31..5baceeb 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedException.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpOperationFailedException.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@ public class NettyHttpOperationFailedException extends CamelException {
     private final int statusCode;
     private final String statusText;
     private final transient HttpContent content;
-    private String contentAsString;
+    private final String contentAsString;
 
     public NettyHttpOperationFailedException(String uri, int statusCode, String statusText, String location, HttpContent content) {
         super("Netty HTTP operation failed invoking " + uri + " with statusCode: " + statusCode + (location != null ? ", redirectLocation: " + location : ""));
@@ -42,11 +42,14 @@ public class NettyHttpOperationFailedException extends CamelException {
         this.statusText = statusText;
         this.redirectLocation = location;
         this.content = content;
+
+        String str = "";
         try {
-            this.contentAsString = NettyConverter.toString(content.content(), null);
+            str = NettyConverter.toString(content.content(), null);
         } catch (UnsupportedEncodingException e) {
             // ignore
         }
+        this.contentAsString = str;
     }
 
     public String getUri() {

http://git-wip-us.apache.org/repos/asf/camel/blob/5cd4af71/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
index 37e7ad8..4d4faf7 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
@@ -75,7 +75,7 @@ public class NettyHttpProducer extends NettyProducer {
         }
 
         // need to release the request when we are done
-        exchange.addOnCompletion(new SynchronizationAdapter(){
+        exchange.addOnCompletion(new SynchronizationAdapter() {
             @Override
             public void onDone(Exchange exchange) {
                 if (request instanceof ReferenceCounted) {
@@ -118,7 +118,7 @@ public class NettyHttpProducer extends NettyProducer {
                             response.content().retain();
 
                             // need to release the response when we are done
-                            exchange.addOnCompletion(new SynchronizationAdapter(){
+                            exchange.addOnCompletion(new SynchronizationAdapter() {
                                 @Override
                                 public void onDone(Exchange exchange) {
                                     if (response.refCnt() > 0) {