Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.12.3, 2.13.0
-
None
-
Windows 8.1
-
Unknown
Description
When writing the following code, the expression
${headers.true} == ${headers.true}
evaluates to false - rather than the expected true.
<camelContext trace="false" xmlns="http://camel.apache.org/schema/blueprint"> <route> <from uri="direct:entry"/> <setHeader headerName="true"> <constant>true</constant> </setHeader> <setBody> <simple resultType="java.lang.Boolean">${headers.true} == ${headers.true}</simple> </setBody> <log message="The expression evaluated to :: ${body}" /> </route> </camelContext>
[ main] route1 INFO The expression evaluated to :: false
Edit: I have tried debugging this, and it seems that the "==" token is being treated as a LiteralExpression - rather than an being a Binary Operator? I'm imaging therefore that the `false` is purely from coercing a String to the java.lang.Boolean resultType?
Attachments
Issue Links
- is duplicated by
-
CAMEL-7428 Simple Language - Operators are not evaluated for setting body or headers
- Resolved