camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/4] git commit: CAMEL-7406: Avoid NPE when password empty in JCR endpoint URI
Date Fri, 02 May 2014 09:17:59 GMT
CAMEL-7406: Avoid NPE when password empty in JCR endpoint URI

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>


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

Branch: refs/heads/camel-2.13.x
Commit: f52f373ec5bb3feeea320fcde381b1ed6411816c
Parents: 9ce8405
Author: Gregor Zurowski <gregor@zurowski.org>
Authored: Thu May 1 22:39:09 2014 -0400
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri May 2 11:17:18 2014 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f52f373e/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
index bdfddf4..b0f2e79 100644
--- a/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
+++ b/components/camel-jcr/src/main/java/org/apache/camel/component/jcr/JcrEndpoint.java
@@ -56,7 +56,7 @@ public class JcrEndpoint extends DefaultEndpoint {
                 String[] creds = uri.getUserInfo().split(":");
                 if (creds != null) {
                     String username = creds[0];
-                    String password = creds.length > 1 ? creds[1] : null;
+                    String password = creds.length > 1 ? creds[1] : "";
                     this.credentials = new SimpleCredentials(username, password.toCharArray());
                 }
             }


Mime
View raw message