camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: Error fixed: Strings were compared by using ==
Date Sun, 17 May 2015 08:42:16 GMT
Repository: camel
Updated Branches:
  refs/heads/master 0019f0b9e -> 325b663c2


Error fixed: Strings were compared by using ==


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

Branch: refs/heads/master
Commit: 325b663c2ec4b64927299b3c1dcd9ac4f08bf14d
Parents: 0019f0b
Author: nkukhar <kukhar.n@gmail.com>
Authored: Fri May 15 23:09:00 2015 -0700
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun May 17 10:46:34 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/box/BoxConfiguration.java   | 5 +++--
 .../java/org/apache/camel/component/http/helper/HttpHelper.java | 2 +-
 .../org/apache/camel/component/http4/helper/HttpHelper.java     | 2 +-
 .../main/java/org/apache/camel/component/solr/SolrProducer.java | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/325b663c/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
index 84e6b68..fe3900f 100644
--- a/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
+++ b/components/camel-box/src/main/java/org/apache/camel/component/box/BoxConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.box;
 
 import java.util.Map;
+import java.util.Objects;
 
 import com.box.boxjavalibv2.BoxConnectionManagerBuilder;
 import com.box.boxjavalibv2.IBoxConfig;
@@ -277,8 +278,8 @@ public class BoxConfiguration {
             return boxConfig == other.boxConfig
                 && connectionManagerBuilder == other.connectionManagerBuilder
                 && httpParams == other.httpParams
-                && clientId == other.clientId
-                && clientSecret == other.clientSecret
+                && Objects.equals(clientId, other.clientId)
+                && Objects.equals(clientSecret, other.clientSecret)
                 && authSecureStorage == other.authSecureStorage;
         }
         return false;

http://git-wip-us.apache.org/repos/asf/camel/blob/325b663c/components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java
b/components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java
index 5705d01..c7cce00 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/helper/HttpHelper.java
@@ -404,7 +404,7 @@ public final class HttpHelper {
                 newUrl = endpoint.getUrlRewrite().rewrite(url, relativeUrl, producer);
             }
 
-            if (ObjectHelper.isNotEmpty(newUrl) && newUrl != url) {
+            if (ObjectHelper.isNotEmpty(newUrl) && !newUrl.equals(url)) {
                 // we got a new url back, that can either be a new absolute url
                 // or a new relative url
                 if (newUrl.startsWith("http:") || newUrl.startsWith("https:")) {

http://git-wip-us.apache.org/repos/asf/camel/blob/325b663c/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
index be53c80..82c4fd9 100644
--- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
+++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
@@ -440,7 +440,7 @@ public final class HttpHelper {
                 newUrl = endpoint.getUrlRewrite().rewrite(url, relativeUrl, producer);
             }
 
-            if (ObjectHelper.isNotEmpty(newUrl) && newUrl != url) {
+            if (ObjectHelper.isNotEmpty(newUrl) && !newUrl.equals(url)) {
                 // we got a new url back, that can either be a new absolute url
                 // or a new relative url
                 if (newUrl.startsWith("http:") || newUrl.startsWith("https:")) {

http://git-wip-us.apache.org/repos/asf/camel/blob/325b663c/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java
b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java
index f168b43..262406b 100644
--- a/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java
+++ b/components/camel-solr/src/main/java/org/apache/camel/component/solr/SolrProducer.java
@@ -51,7 +51,7 @@ public class SolrProducer extends DefaultProducer {
     private SolrServer getBestSolrServer(String operation) {
         if (this.cloudSolrServer != null) {
             return this.cloudSolrServer;
-        } else if (operation == SolrConstants.OPERATION_INSERT_STREAMING) {
+        } else if (SolrConstants.OPERATION_INSERT_STREAMING.equals(operation)) {
             return this.concSolrServer;
         } else {
             return this.httpServer;


Mime
View raw message