struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r520763 - in /struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen: ValidWhenParser.g ValidWhenParser.java
Date Wed, 21 Mar 2007 05:57:11 GMT
Author: bayard
Date: Tue Mar 20 22:57:10 2007
New Revision: 520763

URL: http://svn.apache.org/viewvc?view=rev&rev=520763
Log:
Fixing STR-2802 by removing the unnecessary LBRACKET. Test now passes and I don't understand
what the LBRACKET would have been there for so I think it was just an error that's been in
there forever and ever. 

Modified:
    struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g
    struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.java

Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g?view=diff&rev=520763&r1=520762&r2=520763
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g
(original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.g
Tue Mar 20 22:57:10 2007
@@ -182,7 +182,7 @@
             Object i3 = argStack.pop();
             argStack.push(ValidatorUtils.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
 }
-| identifier LBRACKET integer RBRACKET LBRACKET {
+| identifier LBRACKET integer RBRACKET {
             Object i7 = argStack.pop();
             Object i6 = argStack.pop();
             argStack.push(ValidatorUtils.getValueAsString(form, i6 + "[" + i7 + "]"));

Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.java?view=diff&rev=520763&r1=520762&r2=520763
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.java
(original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/ValidWhenParser.java
Tue Mar 20 22:57:10 2007
@@ -273,12 +273,11 @@
 			argStack.push(ValidatorUtils.getValueAsString(form, i3 + "[" + i4 + "]" + i5));
 			
 		}
-		else if ((LA(1)==IDENTIFIER) && (LA(2)==LBRACKET) && ((LA(3) >= DECIMAL_LITERAL
&& LA(3) <= OCTAL_LITERAL)) && (LA(4)==RBRACKET) && (LA(5)==LBRACKET))
{
+		else if ((LA(1)==IDENTIFIER) && (LA(2)==LBRACKET) && ((LA(3) >= DECIMAL_LITERAL
&& LA(3) <= OCTAL_LITERAL)) && (LA(4)==RBRACKET) && (_tokenSet_0.member(LA(5))))
{
 			identifier();
 			match(LBRACKET);
 			integer();
 			match(RBRACKET);
-			match(LBRACKET);
 			
 			Object i7 = argStack.pop();
 			Object i6 = argStack.pop();



Mime
View raw message