camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-12079) Bean language: support bean::function notation
Date Tue, 09 Jan 2018 12:47:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-12079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318362#comment-16318362
] 

ASF GitHub Bot commented on CAMEL-12079:
----------------------------------------

lburgazzoli commented on a change in pull request #2156: CAMEL-12079: Bean language: support
bean::function notation
URL: https://github.com/apache/camel/pull/2156#discussion_r160396500
 
 

 ##########
 File path: camel-core/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
 ##########
 @@ -95,6 +95,12 @@ public Expression createExpression(String expression) {
             if (idx > 0) {
                 beanName = expression.substring(0, idx);
                 method = expression.substring(idx + 1);
+            } else {
+                int doubleColonIndex = expression.indexOf("::");
+                if (doubleColonIndex > 0) {
+                    beanName = expression.substring(0, doubleColonIndex);
+                    method = expression.substring(doubleColonIndex + 2);
+                }
 
 Review comment:
   We should check first for `::`` then for `.` otherwise expressions like `my.own.Bean::function`
would lead to error   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Bean language: support bean::function notation
> ----------------------------------------------
>
>                 Key: CAMEL-12079
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12079
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 2.21.0
>
>
> As today the bean language supports:
> - bean?function
> - bean.function
> it would be nice if we support also
> -  bean::function



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message