Now that was interesting. My last patch for Hashtable contained a fix for the (new) EnumerateAndModify mauve test and some rewrite for the parameterized class. Obviously the latter made the former fail again. I had to add some null checks in order to make the tests fully PASS.
2006-01-12 Roman Kennke <[EMAIL PROTECTED]> * java/util/Hashtable.java (KeyEnumerator.nextElement): Added null check to avoid NPE. (ValueEnumerator.nextElement): Added null check to avoid NPE. /Roman
Index: java/util/Hashtable.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/Hashtable.java,v retrieving revision 1.37 diff -u -r1.37 Hashtable.java --- java/util/Hashtable.java 11 Jan 2006 20:01:54 -0000 1.37 +++ java/util/Hashtable.java 12 Jan 2006 16:17:01 -0000 @@ -1208,7 +1208,11 @@ */ public Object nextElement() { - return ((HashEntry)super.nextElement()).key; + HashEntry entry = (HashEntry) super.nextElement(); + Object retVal = null; + if (entry != null) + retVal = entry.key; + return retVal; } } // class KeyEnumerator @@ -1236,7 +1240,11 @@ */ public Object nextElement() { - return ((HashEntry)super.nextElement()).value; + HashEntry entry = (HashEntry) super.nextElement(); + Object retVal = null; + if (entry != null) + retVal = entry.value; + return retVal; } } // class ValueEnumerator
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches