DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31816>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31816 Certain EL statements cause an apparant infinite loop in the EL parser. Summary: Certain EL statements cause an apparant infinite loop in the EL parser. Product: Commons Version: 1.0 Final Platform: Macintosh OS/Version: MacOS X Status: NEW Severity: Critical Priority: Other Component: EL AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] The following EL statement causes an apparant infinite loop in the EL parser: ${(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn: toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn: toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn: toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn: toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn:toUpperCase(fn: toUpperCase(fn:toUpperCase('b')))))))))))))))))))))))))))))))))} This is due to the LOOKAHEAD on line 256 of ELParser.jj I have an initial fix which allows the EL expression to be parsed quickly but I have not tested thoroughly. In ELParser.jj delete the grammar production ConditionalExpression() and replace Expression() and OrExpression() with the below text: Expression Expression () : { Expression ret; } { ( ret = OrExpression () ) { return ret; } } Expression OrExpression () : { Expression startExpression, condition, trueBranch=null, falseBranch=null; BinaryOperator operator; Expression expression; List operators = null; List expressions = null; } { startExpression = AndExpression () (( ( (<OR1> | <OR2>) { operator = OrOperator.SINGLETON; } ) expression = AndExpression () { if (operators == null) { operators = new ArrayList (); expressions = new ArrayList (); } operators.add (operator); expressions.add (expression); } )* ( <COND> trueBranch = Expression () <COLON> falseBranch = Expression () )? ) { if (operators != null) { condition = new BinaryOperatorExpression (startExpression, operators, expressions); } else { condition = startExpression; } if(trueBranch != null) return new ConditionalExpression(condition, trueBranch, falseBranch); else return condition; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
