commit | 90edb47e633e9db4370d3e5dec8d40746dbbd268 | [log] [tgz] |
---|---|---|
author | Andrea Cosentino <ancosen@gmail.com> | Tue Feb 14 10:07:15 2017 +0100 |
committer | Andrea Cosentino <ancosen@gmail.com> | Tue Feb 14 10:13:42 2017 +0100 |
tree | d6ddab815e85bd5bff4401bde2bbb3c34c7eb9ab | |
parent | 4ad8bb40a932f852adf81d11bbbb12dc044fe221 [diff] |
CAMEL-10822 - Camel Jasypt component throws NPE. Thanks to Joe Luo for the patch.
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 @@ 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;