Fixed potential NPE
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d36d0152 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d36d0152 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d36d0152 Branch: refs/heads/master Commit: d36d015248f7c48a11010201e2032d3ee1abc2ca Parents: b0c4dcd Author: Claus Ibsen <davscl...@apache.org> Authored: Tue Aug 2 09:57:08 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Aug 2 10:47:53 2016 +0200 ---------------------------------------------------------------------- .../apache/camel/component/properties/DefaultPropertiesParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d36d0152/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java index c7fb283..3ab0f73 100644 --- a/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java +++ b/camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesParser.java @@ -256,7 +256,7 @@ public class DefaultPropertiesParser implements AugmentedPropertyNameAwareProper if (value == null) { StringBuilder esb = new StringBuilder(); - if (propertiesComponent.isDefaultCreated()) { + if (propertiesComponent == null || propertiesComponent.isDefaultCreated()) { // if the component was auto created then include more information that the end user should define it esb.append("PropertiesComponent with name properties must be defined in CamelContext to support property placeholders. "); }