diff -r 5be31d9fa455 -r 5652acd48509 emul/compact/src/main/java/java/util/HashMap.java
--- a/emul/compact/src/main/java/java/util/HashMap.java Wed Jan 23 22:32:27 2013 +0100
+++ b/emul/compact/src/main/java/java/util/HashMap.java Mon Feb 25 19:00:08 2013 +0100
@@ -980,70 +980,9 @@
}
}
- /**
- * Save the state of the HashMap instance to a stream (i.e.,
- * serialize it).
- *
- * @serialData The capacity of the HashMap (the length of the
- * bucket array) is emitted (int), followed by the
- * size (an int, the number of key-value
- * mappings), followed by the key (Object) and value (Object)
- * for each key-value mapping. The key-value mappings are
- * emitted in no particular order.
- */
- private void writeObject(java.io.ObjectOutputStream s)
- throws IOException
- {
- Iterator> i =
- (size > 0) ? entrySet0().iterator() : null;
-
- // Write out the threshold, loadfactor, and any hidden stuff
- s.defaultWriteObject();
-
- // Write out number of buckets
- s.writeInt(table.length);
-
- // Write out size (number of Mappings)
- s.writeInt(size);
-
- // Write out keys and values (alternating)
- if (i != null) {
- while (i.hasNext()) {
- Map.Entry e = i.next();
- s.writeObject(e.getKey());
- s.writeObject(e.getValue());
- }
- }
- }
private static final long serialVersionUID = 362498820763181265L;
- /**
- * Reconstitute the HashMap instance from a stream (i.e.,
- * deserialize it).
- */
- private void readObject(java.io.ObjectInputStream s)
- throws IOException, ClassNotFoundException
- {
- // Read in the threshold, loadfactor, and any hidden stuff
- s.defaultReadObject();
-
- // Read in number of buckets and allocate the bucket array;
- int numBuckets = s.readInt();
- table = new Entry[numBuckets];
-
- init(); // Give subclass a chance to do its thing.
-
- // Read in size (number of Mappings)
- int size = s.readInt();
-
- // Read the keys and values, and put the mappings in the HashMap
- for (int i=0; i