diff -r 5be31d9fa455 -r 5652acd48509 emul/compact/src/main/java/java/util/HashSet.java --- a/emul/compact/src/main/java/java/util/HashSet.java Wed Jan 23 22:32:27 2013 +0100 +++ b/emul/compact/src/main/java/java/util/HashSet.java Mon Feb 25 19:00:08 2013 +0100 @@ -257,56 +257,4 @@ } } - /** - * Save the state of this HashSet instance to a stream (that is, - * serialize it). - * - * @serialData The capacity of the backing HashMap instance - * (int), and its load factor (float) are emitted, followed by - * the size of the set (the number of elements it contains) - * (int), followed by all of its elements (each an Object) in - * no particular order. - */ - private void writeObject(java.io.ObjectOutputStream s) - throws java.io.IOException { - // Write out any hidden serialization magic - s.defaultWriteObject(); - - // Write out HashMap capacity and load factor - s.writeInt(map.capacity()); - s.writeFloat(map.loadFactor()); - - // Write out size - s.writeInt(map.size()); - - // Write out all elements in the proper order. - for (E e : map.keySet()) - s.writeObject(e); - } - - /** - * Reconstitute the HashSet instance from a stream (that is, - * deserialize it). - */ - private void readObject(java.io.ObjectInputStream s) - throws java.io.IOException, ClassNotFoundException { - // Read in any hidden serialization magic - s.defaultReadObject(); - - // Read in HashMap capacity and load factor and create backing HashMap - int capacity = s.readInt(); - float loadFactor = s.readFloat(); - map = (((HashSet)this) instanceof LinkedHashSet ? - new LinkedHashMap(capacity, loadFactor) : - new HashMap(capacity, loadFactor)); - - // Read in size - int size = s.readInt(); - - // Read in all elements in the proper order. - for (int i=0; i