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

Alan Foster updated CAMEL-7359:
-------------------------------

    Description: 
The following Simple expression is valid and runs OK - however it may have been 
appropriate to report an error to the developer.

{code:xml}
            <setBody>
                <simple>${bodyAs(java.lang.String) Additional text 
ignored...}</simple>
            </setBody>
{code}

The above seems a somewhat contrived example; However this is a more 
'realistic' scenario in which the behaviour is not unexpected -

{code:xml}
            <setBody>
                <simple>${bodyAs(java.lang.String).toUpperCase()}</simple>
            </setBody>
{code}

The above simple expression will simply set the body to be of type 
java.lang.String, however will not invoke the subsequent toUpperCase() call - 
likewise no error is reported to the developer.

  was:
The following Simple expression is valid and runs OK - however it may have been 
appropriate to report an error to the developer.

{code:xml}
            <setBody>
                <simple>${bodyAs(java.lang.String) Additional text 
ignored...}</simple>
            </setBody>
{code}

The above seems a somewhat contrived example; However this is a more 
'realistic' scenario in which the behaviour is not unexpected -

{code:xml}
            <setBody>
                <simple>${bodyAs(java.lang.String).toUpperCase()}</simple>
            </setBody>
{code}

The above simple expression will simple set the body to be of type 
java.lang.String, however will not invoke the subsequent toUpperCase() call - 
likewise no error is reported to the developer.


> Simple Language - Additional after text after inbuilt function call is ignored
> ------------------------------------------------------------------------------
>
>                 Key: CAMEL-7359
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7359
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.12.3, 2.13.0
>            Reporter: Alan Foster
>
> The following Simple expression is valid and runs OK - however it may have 
> been appropriate to report an error to the developer.
> {code:xml}
>             <setBody>
>                 <simple>${bodyAs(java.lang.String) Additional text 
> ignored...}</simple>
>             </setBody>
> {code}
> The above seems a somewhat contrived example; However this is a more 
> 'realistic' scenario in which the behaviour is not unexpected -
> {code:xml}
>             <setBody>
>                 <simple>${bodyAs(java.lang.String).toUpperCase()}</simple>
>             </setBody>
> {code}
> The above simple expression will simply set the body to be of type 
> java.lang.String, however will not invoke the subsequent toUpperCase() call - 
> likewise no error is reported to the developer.



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

Reply via email to