Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3-next-M7, 4.0.0-RC5
-
None
-
None
Description
If you use a string with say "startswith" in an EL function it will fail because String is not registered for reflection and get this error.
EL Expression:
rendered="#{not empty menuItem.url and empty menuItem.badge and not menuItem.url.startsWith('/') and empty menuItem.menuItems}"
Error:
Method not found: class java.lang.String.startsWith(java.lang.String): javax.el.MethodNotFoundException: Method not found: class java.lang.String.startsWith(java.lang.String) at javax.el.ELUtil.findWrapper(ELUtil.java:360) at javax.el.ELUtil.findMethod(ELUtil.java:253) at javax.el.ELUtil.findMethod(ELUtil.java:212) at javax.el.BeanELResolver.invoke(BeanELResolver.java:430) at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:198) at org.apache.el.parser.AstValue.getValue(AstValue.java:159) at org.apache.el.parser.AstNot.getValue(AstNot.java:43) at org.apache.el.parser.AstAnd.getValue(AstAnd.java:42) at org.apache.el.parser.AstAnd.getValue(AstAnd.java:37) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:190)