Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.9.2
-
Fix Version/s: 2.18.0
-
Component/s: camel-core
-
Labels:None
-
Estimated Complexity:Advanced
Description
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.
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); }
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