Hello.  I am trying to create a Predicate from an Expression.  The
Expression is created from a String.  This is what I am trying to do:

String language = "simple";
String value = "${body} contains 'test'";
Expression expression = ExpressionBuilder.languageExpression(language,
value);
Predicate predicate = PredicateBuilder.toPredicate(expression);

My debugging output *looks* like I am creating it properly:
predicate: language[simple:${body} contains 'test']

But when I try to use this when processing an Exchange, I am getting a null
pointer exception:
java.lang.NullPointerException: null
        at
org.apache.camel.support.builder.ExpressionBuilder$22.matches(ExpressionBuilder.java:784)
~[camel-support-3.15.0-SNAPSHOT.jar:3.15.0-SNAPSHOT]

Can anyone give me an idea about what I might be missing?

Thanks,
Steve

Reply via email to