camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/5] camel git commit: Fixed potential NPE
Date Tue, 02 Aug 2016 08:48:04 GMT
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 <davsclaus@apache.org>
Authored: Tue Aug 2 09:57:08 2016 +0200
Committer: Claus Ibsen <davsclaus@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. ");
                 }


Mime
View raw message