Details
Description
The following Simple expression is valid and runs OK - however it may have been appropriate to report an error to the developer.
<setBody> <simple>${bodyAs(java.lang.String) Additional text ignored...}</simple> </setBody>
The above seems a somewhat contrived example; However this is a more 'realistic' scenario in which the behaviour is not unexpected -
<setBody> <simple>${bodyAs(java.lang.String).toUpperCase()}</simple> </setBody>
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.
Camel has the same issue when using the function of headerAs and mandatoryBodyAs.