This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch lang2 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4376d513660df2d181ef8495d815ae9a0b31cf67 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Feb 2 12:14:07 2024 +0100 CAMEL-20378: Languages should be thread-safe and be configured only via properties array, all in the same way. --- .../src/main/java/org/apache/camel/language/bean/BeanLanguage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java index e34cef7caf4..ba3e84fbde2 100644 --- a/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java +++ b/components/camel-bean/src/main/java/org/apache/camel/language/bean/BeanLanguage.java @@ -148,7 +148,9 @@ public class BeanLanguage extends TypedLanguageSupport implements ScriptingLangu answer.setBeanComponent(beanComponent); answer.setParameterMappingStrategy(parameterMappingStrategy); answer.setSimple(simple); - answer.init(getCamelContext()); + if (getCamelContext() != null) { + answer.init(getCamelContext()); + } return answer; }