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 06e77c6 CAMEL-15704: camel-csimple - Compiled simple language. 06e77c6 is described below commit 06e77c605f61ce34f07a32391ce988dd825e7379 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Dec 4 10:08:31 2020 +0100 CAMEL-15704: camel-csimple - Compiled simple language. --- .../main/java/org/apache/camel/language/bean/BeanLanguage.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 3780d1b..6c7b515 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 @@ -165,9 +165,11 @@ public class BeanLanguage extends LanguageSupport implements PropertyConfigurer, throw new IllegalArgumentException("Bean language requires bean, beanType, or ref argument"); } if (properties.length == 5) { - BeanScope scope = (BeanScope) properties[4]; - if (scope != null) { - answer.setScope(scope); + Object scope = properties[4]; + if (scope instanceof BeanScope) { + answer.setScope((BeanScope) scope); + } else if (scope != null) { + answer.setScope(BeanScope.valueOf(scope.toString())); } } answer.setBeanComponent(beanComponent);