This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a059764068b7730efc1baa6717c7277ed627bbf7
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Fri Jan 3 21:00:37 2020 +0100

    Fixed potential NPE from user forum issue
---
 .../main/java/org/apache/camel/model/ProcessorDefinitionHelper.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
 
b/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
index d5dfae3..9daf575 100644
--- 
a/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
+++ 
b/core/camel-core-engine/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
@@ -802,8 +802,9 @@ public final class ProcessorDefinitionHelper {
             // lookup and resolve properties for String based properties
             for (Map.Entry<String, Supplier<String>> entry : 
readProperties.entrySet()) {
                 String name = entry.getKey();
-                String value = entry.getValue().get();
-                String text = camelContext.resolvePropertyPlaceholders(value);
+                Supplier<String> supplier = entry.getValue();
+                String value = supplier != null ? supplier.get() : null;
+                String text = value != null ? 
camelContext.resolvePropertyPlaceholders(value) : null;
 
                 // is the value a known field (currently we only support
                 // constants from Exchange.class)

Reply via email to