directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 20575 - incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/digester
Date Sat, 29 May 2004 04:50:55 GMT
Author: akarasulu
Date: Fri May 28 21:50:55 2004
New Revision: 20575

Modified:
   incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/digester/BERDigester.java
Log:
For some reason the finish() method was reverse processing rules and removing
them from the matched list.  This actually removed the rules from the rules
base since the matched list was the list of the TagNode.  Not good but we did 
not detect this bug because of the way JUnit tests reset everything and we
were only trying one decode at a time.


Modified: incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/digester/BERDigester.java
==============================================================================
--- incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/digester/BERDigester.java
(original)
+++ incubator/directory/snickers/trunk/ber-codec/src/java/org/apache/snickers/ber/digester/BERDigester.java
Fri May 28 21:50:55 2004
@@ -79,7 +79,7 @@
     private ShortStack shortStack ;
     /** the tag stack used to store the nesting pattern */
     private IntStack tagStack ;
-    /** the rules base used by this rulesBase */
+    /** the rules base used by this digester */
     private Rules rules ;
     /** the currently matched rules */
     private List matched ;
@@ -1090,11 +1090,9 @@
             
             for ( int i = 0; i < matched.size(); i++ ) 
             {
-                int j = ( matched.size() - i ) - 1 ;
-                
-                try 
+                try
                 {
-                    rule = ( Rule ) matched.remove( j ) ;
+                    rule = ( Rule ) matched.get( i ) ;
                     rule.finish() ;
                     monitor.ruleCompleted( this, rule ) ;
                     seen.add( rule ) ;

Mime
View raw message