1.1 --- a/emul/compact/src/main/java/java/util/ArrayList.java Wed Jan 23 22:32:27 2013 +0100
1.2 +++ b/emul/compact/src/main/java/java/util/ArrayList.java Wed Jan 23 22:55:28 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 * Resizable-array implementation of the <tt>List</tt> interface. Implements
1.11 * all optional list operations, and permits all elements, including
1.12 @@ -689,51 +691,6 @@
1.13 }
1.14
1.15 /**
1.16 - * Save the state of the <tt>ArrayList</tt> instance to a stream (that
1.17 - * is, serialize it).
1.18 - *
1.19 - * @serialData The length of the array backing the <tt>ArrayList</tt>
1.20 - * instance is emitted (int), followed by all of its elements
1.21 - * (each an <tt>Object</tt>) in the proper order.
1.22 - */
1.23 - private void writeObject(java.io.ObjectOutputStream s)
1.24 - throws java.io.IOException{
1.25 - // Write out element count, and any hidden stuff
1.26 - int expectedModCount = modCount;
1.27 - s.defaultWriteObject();
1.28 -
1.29 - // Write out array length
1.30 - s.writeInt(elementData.length);
1.31 -
1.32 - // Write out all elements in the proper order.
1.33 - for (int i=0; i<size; i++)
1.34 - s.writeObject(elementData[i]);
1.35 -
1.36 - if (modCount != expectedModCount) {
1.37 - throw new ConcurrentModificationException();
1.38 - }
1.39 -
1.40 - }
1.41 -
1.42 - /**
1.43 - * Reconstitute the <tt>ArrayList</tt> instance from a stream (that is,
1.44 - * deserialize it).
1.45 - */
1.46 - private void readObject(java.io.ObjectInputStream s)
1.47 - throws java.io.IOException, ClassNotFoundException {
1.48 - // Read in size, and any hidden stuff
1.49 - s.defaultReadObject();
1.50 -
1.51 - // Read in array length and allocate array
1.52 - int arrayLength = s.readInt();
1.53 - Object[] a = elementData = new Object[arrayLength];
1.54 -
1.55 - // Read in all elements in the proper order.
1.56 - for (int i=0; i<size; i++)
1.57 - a[i] = s.readObject();
1.58 - }
1.59 -
1.60 - /**
1.61 * Returns a list iterator over the elements in this list (in proper
1.62 * sequence), starting at the specified position in the list.
1.63 * The specified index indicates the first element that would be