How can I convert a property on an Apache Camel Exchange to uppercase, in Apache Camel expression language?
e.g.
.when(simple("${property.countryCode.toUpperCase} regex 'NO?'"))
But I am getting:
org.apache.camel.language.bean.RuntimeBeanExpressionException:
Failed to invoke method: .toUpperCase on null
I have verified that my property does in fact exist via .log("${property.countryCode}")
.
This shouldn't be so hard, to get toUpperCase
in Apache Simple (but it is).
I don't want to have to do toUpperCase
in Java, or Groovy, or whatever - there must be an easier way
Try
.when(simple("${property.countryCode.toUpperCase()} regex 'NO?'"))