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] [Resolved] (CAMEL-7298) Simple Language - Binary Expression Equality Fails
Date Tue, 18 Mar 2014 06:19:50 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-7298.
--------------------------------

    Resolution: Fixed

> Simple Language - Binary Expression Equality Fails
> --------------------------------------------------
>
>                 Key: CAMEL-7298
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7298
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.3, 2.13.0
>         Environment: Windows 8.1
>            Reporter: Alan Foster
>            Assignee: Claus Ibsen
>             Fix For: 2.12.4, 2.13.1, 2.14.0
>
>
> When writing the following code, the expression {code}${headers.true} == ${headers.true}{code}
evaluates to false - rather than the expected true.
> {code:xml}
>     <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>
> {code}
> {code}
> [                          main] route1                         INFO  The expression
evaluated to :: false
> {code}
> 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?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message