[ https://issues.apache.org/jira/browse/EL-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated EL-7: --------------------------- Attachment: EL-7.patch Unit test attached that reproduces this bug. > [el] Expressions with conditionals and unprefixed functions do not alway parse > ------------------------------------------------------------------------------ > > Key: EL-7 > URL: https://issues.apache.org/jira/browse/EL-7 > Project: Commons EL > Issue Type: Bug > Environment: Operating System: Windows XP > Platform: PC > Reporter: Richard Backhouse > Fix For: 1.1 > > Attachments: EL-7.patch > > > If you take a el expression of the form : > ${true ? a : reverse("Foo")} > The commons el parser will fail to parse this. > The ambiguity between the Conditional rule and the Function rule (both using ":" > as a token) seems to cause the parser problems. > Here is a jsp that can be used to easily verify this : > <%@page contentType="text/html"%> > > > <% > String expr = "${true ? a : reverse(\"Foo\")}"; > try { > pageContext.getExpressionEvaluator().parseExpression(expr, > java.lang.String.class, > null); > out.println("Parsed " + expr); > } > catch (javax.servlet.jsp.el.ELException e) { > out.println("Failed to parsed "+ expr + " : " + e.getMessage()); > } > %> > > > Just by adding a prefix to the function or changing the true condition to > something other than a value will make it parse. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.