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

Claus Ibsen resolved CAMEL-7303.
--------------------------------

    Resolution: Fixed

Thanks

> Simple Language - Header access surrounded with quotes
> ------------------------------------------------------
>
>                 Key: CAMEL-7303
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7303
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.3
>            Reporter: Alan Foster
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.12.4, 2.13.1, 2.14.0
>
>
> Quotes within header access are not currently handled in the same way as the 
> inbuilt {{headerAs}} function or the body accessor notation - perhaps these 
> should be aligned?
> For instance with the following route
> {code:xml}
>     <camelContext trace="false" 
> xmlns="http://camel.apache.org/schema/blueprint";>
>         <route>
>             <from uri="direct:entry"/>
>             <setHeader headerName="some key">
>                 <constant>hello world</constant>
>             </setHeader>
>             <setBody>
>                 <simple>${headers['some key']}</simple>
>             </setBody>
>             <log message="The expression evaluated to :: ${body}" />
>         </route>
>     </camelContext>
> {code}
> Outcome :
> {code}[                          main] route1                         INFO  
> The expression evaluated to :: {code}
> Expected :
> {code}[                          main] route1                         INFO  
> The expression evaluated to :: hello world{code}
> For reference, the current notation works within other parts of the language 
> and are handled as expected
> {code}${body['some key']}{code}
> {code}${headerAs('some key', java.lang.Boolean}{code}
> I think the fix might be to use {{StringHelper.removeQuotes}} on line #269 
> within SimpleFunctionExpression.java possibly, such as
> {code}remainder = StringHelper.removeQuotes(remainder.substring(1, 
> remainder.length() - 1));{code}



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

Reply via email to