When using ${empty(xxx)}, EL parser thinks it is an unknown function :empty and throws ClassCastException: java.lang.ClassCastException: java.lang.NullPointerException at org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:135) at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:147) at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:190) at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68) at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924) I think it is because of some changes in ELParser.java.... with best regards Grzegorz Grzybek
It looks like it is caused by the fix for 42565. That fix causes issues with use of brackets and whitespace. For example, these work: ${empty ('')} ${(true) and (false)} but these fail: ${empty('')} ${(true)and(false)} The workaround is to add some white space. I'm currently looking at the jjt file.
I have applied a fix to trunk and proposed the fix for 6.0.x. My testing shows no issues with the new fix but additional testing is always welcome.
This fix has been applied to 6.0.x and will be included in 6.0.19 onwards.
*** Bug 45937 has been marked as a duplicate of this bug. ***
*** Bug 46084 has been marked as a duplicate of this bug. ***
*** Bug 46596 has been marked as a duplicate of this bug. ***
*** Bug 46965 has been marked as a duplicate of this bug. ***