You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2017/04/27 10:03:43 UTC

camel git commit: CAMEL-11210 Don't return null for getErrors in ...

Repository: camel
Updated Branches:
  refs/heads/master 7c9a7bd98 -> cc64dc47f


CAMEL-11210 Don't return null for getErrors in ...

...SalesforceException

Returning `Collections.emptyList()` instead of `null` for `null`
`errors` field.


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

Branch: refs/heads/master
Commit: cc64dc47f0c6a531eb155c33001d2ea1b4dd28db
Parents: 7c9a7bd
Author: Zoran Regvart <zr...@apache.org>
Authored: Thu Apr 27 12:03:06 2017 +0200
Committer: Zoran Regvart <zr...@apache.org>
Committed: Thu Apr 27 12:03:32 2017 +0200

----------------------------------------------------------------------
 .../apache/camel/component/salesforce/api/SalesforceException.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cc64dc47/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
----------------------------------------------------------------------
diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
index 02d7c8d..1b4054d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/SalesforceException.java
@@ -64,7 +64,7 @@ public class SalesforceException extends CamelException {
     }
 
     public List<RestError> getErrors() {
-        return errors != null ? Collections.unmodifiableList(errors) : null;
+        return errors == null ? Collections.emptyList() : Collections.unmodifiableList(errors);
     }
 
     public int getStatusCode() {