Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A93A10124 for ; Fri, 2 May 2014 09:18:04 +0000 (UTC) Received: (qmail 50432 invoked by uid 500); 2 May 2014 09:17:58 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 50340 invoked by uid 500); 2 May 2014 09:17:58 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 50329 invoked by uid 99); 2 May 2014 09:17:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 09:17:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C03834502D; Fri, 2 May 2014 09:17:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Fri, 02 May 2014 09:17:57 -0000 Message-Id: <90bf1f8818ae494a9b5efc0ab3b75bf3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: CAMEL-7406: Avoid NPE when password empty in JCR endpoint URI Repository: camel Updated Branches: refs/heads/camel-2.12.x da561c8b4 -> 7f2805625 refs/heads/camel-2.13.x 9ce8405c5 -> f52f373ec refs/heads/master 2d6736a5a -> 05efe4902 CAMEL-7406: Avoid NPE when password empty in JCR endpoint URI Signed-off-by: Gregor Zurowski Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1073c973 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1073c973 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1073c973 Branch: refs/heads/master Commit: 1073c9737e8f2f003966170aca0bdd6751e4396a Parents: 57bc5fb Author: Gregor Zurowski Authored: Thu May 1 22:39:09 2014 -0400 Committer: Gregor Zurowski Committed: Thu May 1 22:42:00 2014 -0400 ---------------------------------------------------------------------- .../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/1073c973/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()); } }