costin 01/08/28 22:08:40 Modified: src/share/org/apache/tomcat/util/collections SimpleHashtable.java Log: Small fix in SimpleHashtable, we can have calls to nextElement without hasMore. Revision Changes Path 1.5 +5 -1 jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimpleHashtable.java Index: SimpleHashtable.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/collections/SimpleHashtable.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SimpleHashtable.java 2001/07/19 05:50:46 1.4 +++ SimpleHashtable.java 2001/08/29 05:08:40 1.5 @@ -97,7 +97,7 @@ * it makes a significant difference when normalizing attributes, * which is done for each start-element construct. * - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public final class SimpleHashtable implements Enumeration { @@ -166,6 +166,7 @@ public Enumeration keys() { currentBucket = 0; current = null; + hasMoreElements(); return this; } @@ -197,6 +198,9 @@ throw new IllegalStateException (); retval = current.key; current = current.next; + // Advance to the next position ( we may call next after next, + // without hasMore ) + hasMoreElements(); return retval; }