You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/03/18 06:48:04 UTC
[camel] branch master updated: CAMEL-14723: Fixed NPE
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
The following commit(s) were added to refs/heads/master by this push:
new 8f8bd83 CAMEL-14723: Fixed NPE
8f8bd83 is described below
commit 8f8bd833663b59366540c9ee32bef7c05c6c05e6
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Mar 17 16:58:04 2020 +0100
CAMEL-14723: Fixed NPE
---
.../apache/camel/core/xml/AbstractCamelContextFactoryBean.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 97dc676..b8e8ffa 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -972,7 +972,15 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
context.getTypeConverterRegistry().setTypeConverterExistsLoggingLevel(getTypeConverterExistsLoggingLevel());
}
if (getRestConfiguration() != null) {
- getRestConfiguration().asRestConfiguration(context, context.getRestConfiguration());
+ RestConfiguration config = context.getRestConfiguration();
+ if (config == null) {
+ config = new RestConfiguration();
+ context.setRestConfiguration(config);
+ }
+ if (context.getRestConfiguration() != null) {
+ // merge on top of existing
+ getRestConfiguration().asRestConfiguration(context, config);
+ }
}
if (getDefaultServiceCallConfiguration() != null) {
context.setServiceCallConfiguration(getDefaultServiceCallConfiguration());