Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B9843200C1B for ; Tue, 14 Feb 2017 10:13:15 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B8187160B6A; Tue, 14 Feb 2017 09:13:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0E739160B52 for ; Tue, 14 Feb 2017 10:13:14 +0100 (CET) Received: (qmail 19253 invoked by uid 500); 14 Feb 2017 09:13:14 -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 19244 invoked by uid 99); 14 Feb 2017 09:13:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2017 09:13:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 26AABDFD73; Tue, 14 Feb 2017 09:13:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: acosentino@apache.org To: commits@camel.apache.org Message-Id: <1d91d1dd19624d3ea5bd8a1b44be0bb5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: camel git commit: CAMEL-10822 - Camel Jasypt component throws NPE. Thanks to Joe Luo for the patch. Date: Tue, 14 Feb 2017 09:13:14 +0000 (UTC) archived-at: Tue, 14 Feb 2017 09:13:15 -0000 Repository: camel Updated Branches: refs/heads/camel-2.17.x 7bfed8285 -> da7d0aadd CAMEL-10822 - Camel Jasypt component throws NPE. Thanks to Joe Luo for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/da7d0aad Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/da7d0aad Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/da7d0aad Branch: refs/heads/camel-2.17.x Commit: da7d0aadd6f69c0bfb9f89e65df6d09e8d09b2bb Parents: 7bfed82 Author: Andrea Cosentino Authored: Tue Feb 14 10:07:15 2017 +0100 Committer: Andrea Cosentino Committed: Tue Feb 14 10:10:46 2017 +0100 ---------------------------------------------------------------------- .../org/apache/camel/component/jasypt/JasyptPropertiesParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/da7d0aad/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java ---------------------------------------------------------------------- diff --git a/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java b/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java index f089533..be7e79f 100755 --- a/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java +++ b/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java @@ -92,7 +92,7 @@ public class JasyptPropertiesParser extends DefaultPropertiesParser { if (password.startsWith("sysenv:")) { password = System.getenv(ObjectHelper.after(password, "sysenv:")); } - if (password.startsWith("sys:")) { + if (ObjectHelper.isNotEmpty(password) && password.startsWith("sys:")) { password = System.getProperty(ObjectHelper.after(password, "sys:")); } this.password = password;