This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Fix Hashtable enumeration crash


Ugh. I found a bug already (although I blame the compiler for this one
;-)

regards

  [ bryce ]


Index: Hashtable.java
===================================================================
RCS file: /cvs/gcc/egcs/libjava/java/util/Hashtable.java,v
retrieving revision 1.7
diff -u -r1.7 Hashtable.java
--- Hashtable.java	2000/12/11 03:47:47	1.7
+++ Hashtable.java	2000/12/11 04:53:47
@@ -862,7 +862,7 @@
       if (count >= size)
         throw new NoSuchElementException();
       count++;
-      HashMap.Entry e;
+      HashMap.Entry e = null;
       if (last != null)
         e = last.next;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]