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-5252) Simple language - Improved OGNL invocation with simple expression as functions for parameters
Date Mon, 02 May 2016 09:16:12 GMT

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

Claus Ibsen commented on CAMEL-5252:
------------------------------------

Got this working with lazy eval, but this requires us to trigger the lazy eval at certain
times when the expression is evaluated. So the code changes are needed in several places.

> Simple language - Improved OGNL invocation with simple expression as functions for parameters
> ---------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5252
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5252
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.2
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Invoking-a-bean-returned-by-a-previous-bean-invocation-tp5676696.html
> The example with the nested animal parameter.
> We should see if we can better detect this use-case, and avoid the intermediate String
conversion, when its a parameter type.
> {code}
>        public void testBodyOgnlOnAnimalWithOgnlParams() throws Exception {
>                exchange.getIn().setBody(new Animal("tiger", 13));
>                exchange.getIn().setHeader("friend", new Animal("donkey", 4));
>                assertExpression("${body.setFriend(${header.friend})}", null);
>        }
> {code}
> Fails with org.apache.camel.NoTypeConversionAvailableException: No type
> converter available to convert from type: java.lang.String to the required
> type: org.apache.camel.language.simple.SimpleTest.Animal with value donkey



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

Mime
View raw message