camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Foster (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-7298) Simple Language - Binary Expression Equality Fails
Date Sun, 16 Mar 2014 21:22:42 GMT

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

Alan Foster updated CAMEL-7298:
-------------------------------

    Description: 
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}

I have tried debugging this, and it seems that the "==" token is being treated as a LiteralExpression
- rather than an being a Binary Operator?

  was:
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}


> Simple Language - Binary Expression Equality Fails
> --------------------------------------------------
>
>                 Key: CAMEL-7298
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7298
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.12.3
>         Environment: Windows 8.1
>            Reporter: Alan Foster
>
> 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}
> I have tried debugging this, and it seems that the "==" token is being treated as a LiteralExpression
- rather than an being a Binary Operator?



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

Mime
View raw message