camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6646) Support static method calls on OGNL expressions
Date Sun, 12 Jul 2015 12:48:04 GMT

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

Claus Ibsen commented on CAMEL-6646:
------------------------------------

Ah its still there today. Yeah we would need to get BeanInfo and find all static methods.

> Support static method calls on OGNL expressions
> -----------------------------------------------
>
>                 Key: CAMEL-6646
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6646
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Raúl Kripalani
>            Assignee: Claus Ibsen
>             Fix For: 2.16.0
>
>
> In OgnlInvokeProcessor, we currently don't support static method calls as we always require
a bean instance.
> See this block of code in 2.10.3, starting on OgnlInvokeProcessor:247:
> {code}
> // loop and invoke each method
> Object beanToCall = beanHolder.getBean();
> // there must be a bean to call with, we currently does not support OGNL expressions
on using purely static methods
> if (beanToCall == null) {
>     throw new IllegalArgumentException("Bean instance is null. OGNL bean expressions
requires bean instances.");
> }
> {code}
> Add support for these cases, especially handy if you use the method() expression frequently.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message