camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] camel git commit: replace null test by ObjectHelper.isEmpty() corrected JavaDoc
Date Tue, 07 Feb 2017 17:30:47 GMT
Repository: camel
Updated Branches:
  refs/heads/master 2714b4b48 -> c2408fc4a


replace null test by ObjectHelper.isEmpty()
corrected JavaDoc


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

Branch: refs/heads/master
Commit: d0ff107f682653c3b8092efaed6829d8dc4e1eb7
Parents: d945b86
Author: Jaira abderrahim <abderrahim.jaira.externe@capgemini.com>
Authored: Tue Feb 7 17:30:35 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Feb 7 18:28:19 2017 +0100

----------------------------------------------------------------------
 .../camel/component/salesforce/internal/SalesforceSession.java  | 4 ++--
 .../apache/camel/component/salesforce/LoginConfigHelper.java    | 5 +++--
 .../salesforce/springboot/SalesforceComponentConfiguration.java | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d0ff107f/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
index 22e0d14..d8bebf8 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/SalesforceSession.java
@@ -73,7 +73,7 @@ public class SalesforceSession implements Service {
         ObjectHelper.notNull(config.getClientId(), "clientId");
         ObjectHelper.notNull(config.getClientSecret(), "clientSecret");
 
-        if (config.getRefreshToken() == null) {
+        if (ObjectHelper.isEmpty(config.getRefreshToken())) {
             ObjectHelper.notNull(config.getUserName(), "userName");
             ObjectHelper.notNull(config.getPassword(), "password");
         } else {
@@ -141,7 +141,7 @@ public class SalesforceSession implements Service {
         fields.put("client_secret", config.getClientSecret());
         fields.put("format", "json");
 
-        if (config.getRefreshToken() == null) {
+        if (ObjectHelper.isEmpty(config.getRefreshToken())) {
             fields.put("grant_type", "password");
             fields.put("username", config.getUserName());
             fields.put("password", config.getPassword());

http://git-wip-us.apache.org/repos/asf/camel/blob/d0ff107f/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LoginConfigHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LoginConfigHelper.java
b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LoginConfigHelper.java
index 7a51470..0f65a6a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LoginConfigHelper.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LoginConfigHelper.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
+import org.apache.camel.util.ObjectHelper;
 import org.junit.Assert;
 
 public class LoginConfigHelper extends Assert {
@@ -38,7 +39,7 @@ public class LoginConfigHelper extends Assert {
             stream = new FileInputStream(TEST_LOGIN_PROPERTIES);
             properties.load(stream);
 
-            if (properties.getProperty("refreshToken")== null) {
+            if (ObjectHelper.isEmpty(properties.getProperty("refreshToken"))) {
                 config = new SalesforceLoginConfig(
                         properties.getProperty("loginUrl", SalesforceLoginConfig.DEFAULT_LOGIN_URL),
                         properties.getProperty("clientId"),
@@ -59,7 +60,7 @@ public class LoginConfigHelper extends Assert {
             assertNotNull("Null loginUrl", config.getLoginUrl());
             assertNotNull("Null clientId", config.getClientId());
             assertNotNull("Null clientSecret", config.getClientSecret());
-            if (properties.getProperty("refreshToken")== null) {
+            if (ObjectHelper.isEmpty(properties.getProperty("refreshToken"))) {
                 assertNotNull("Null userName", config.getUserName());
                 assertNotNull("Null password", config.getPassword());
             } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/d0ff107f/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
index 55e2279..fe6f000 100644
--- a/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-salesforce-starter/src/main/java/org/apache/camel/component/salesforce/springboot/SalesforceComponentConfiguration.java
@@ -832,7 +832,7 @@ public class SalesforceComponentConfiguration {
          */
         private String clientSecret;
         /**
-         * Salesforce connected application Consumer token
+         * Salesforce connected application OAuth refresh token
          */
         private String refreshToken;
         /**


Mime
View raw message