1.1 --- a/emul/compact/src/main/java/java/util/PriorityQueue.java Fri Feb 01 16:10:10 2013 +0100
1.2 +++ b/emul/compact/src/main/java/java/util/PriorityQueue.java Fri Feb 01 16:25:57 2013 +0100
1.3 @@ -25,6 +25,8 @@
1.4
1.5 package java.util;
1.6
1.7 +import org.apidesign.bck2brwsr.emul.lang.System;
1.8 +
1.9 /**
1.10 * An unbounded priority {@linkplain Queue queue} based on a priority heap.
1.11 * The elements of the priority queue are ordered according to their
1.12 @@ -726,50 +728,5 @@
1.13 return comparator;
1.14 }
1.15
1.16 - /**
1.17 - * Saves the state of the instance to a stream (that
1.18 - * is, serializes it).
1.19 - *
1.20 - * @serialData The length of the array backing the instance is
1.21 - * emitted (int), followed by all of its elements
1.22 - * (each an {@code Object}) in the proper order.
1.23 - * @param s the stream
1.24 - */
1.25 - private void writeObject(java.io.ObjectOutputStream s)
1.26 - throws java.io.IOException{
1.27 - // Write out element count, and any hidden stuff
1.28 - s.defaultWriteObject();
1.29
1.30 - // Write out array length, for compatibility with 1.5 version
1.31 - s.writeInt(Math.max(2, size + 1));
1.32 -
1.33 - // Write out all elements in the "proper order".
1.34 - for (int i = 0; i < size; i++)
1.35 - s.writeObject(queue[i]);
1.36 - }
1.37 -
1.38 - /**
1.39 - * Reconstitutes the {@code PriorityQueue} instance from a stream
1.40 - * (that is, deserializes it).
1.41 - *
1.42 - * @param s the stream
1.43 - */
1.44 - private void readObject(java.io.ObjectInputStream s)
1.45 - throws java.io.IOException, ClassNotFoundException {
1.46 - // Read in size, and any hidden stuff
1.47 - s.defaultReadObject();
1.48 -
1.49 - // Read in (and discard) array length
1.50 - s.readInt();
1.51 -
1.52 - queue = new Object[size];
1.53 -
1.54 - // Read in all elements.
1.55 - for (int i = 0; i < size; i++)
1.56 - queue[i] = s.readObject();
1.57 -
1.58 - // Elements are guaranteed to be in "proper order", but the
1.59 - // spec has never explained what that might be.
1.60 - heapify();
1.61 - }
1.62 }