src/java.base/share/classes/java/util/ArrayList.java
changeset 57956 e0b8b019d2f5
parent 55036 265b110fc022
equal deleted inserted replaced
57955:18863bf3501f 57956:e0b8b019d2f5
   107  * @since   1.2
   107  * @since   1.2
   108  */
   108  */
   109 public class ArrayList<E> extends AbstractList<E>
   109 public class ArrayList<E> extends AbstractList<E>
   110         implements List<E>, RandomAccess, Cloneable, java.io.Serializable
   110         implements List<E>, RandomAccess, Cloneable, java.io.Serializable
   111 {
   111 {
       
   112     @java.io.Serial
   112     private static final long serialVersionUID = 8683452581122892189L;
   113     private static final long serialVersionUID = 8683452581122892189L;
   113 
   114 
   114     /**
   115     /**
   115      * Default initial capacity.
   116      * Default initial capacity.
   116      */
   117      */
   847      * @throws java.io.IOException if an I/O error occurs
   848      * @throws java.io.IOException if an I/O error occurs
   848      * @serialData The length of the array backing the {@code ArrayList}
   849      * @serialData The length of the array backing the {@code ArrayList}
   849      *             instance is emitted (int), followed by all of its elements
   850      *             instance is emitted (int), followed by all of its elements
   850      *             (each an {@code Object}) in the proper order.
   851      *             (each an {@code Object}) in the proper order.
   851      */
   852      */
       
   853     @java.io.Serial
   852     private void writeObject(java.io.ObjectOutputStream s)
   854     private void writeObject(java.io.ObjectOutputStream s)
   853         throws java.io.IOException {
   855         throws java.io.IOException {
   854         // Write out element count, and any hidden stuff
   856         // Write out element count, and any hidden stuff
   855         int expectedModCount = modCount;
   857         int expectedModCount = modCount;
   856         s.defaultWriteObject();
   858         s.defaultWriteObject();
   874      * @param s the stream
   876      * @param s the stream
   875      * @throws ClassNotFoundException if the class of a serialized object
   877      * @throws ClassNotFoundException if the class of a serialized object
   876      *         could not be found
   878      *         could not be found
   877      * @throws java.io.IOException if an I/O error occurs
   879      * @throws java.io.IOException if an I/O error occurs
   878      */
   880      */
       
   881     @java.io.Serial
   879     private void readObject(java.io.ObjectInputStream s)
   882     private void readObject(java.io.ObjectInputStream s)
   880         throws java.io.IOException, ClassNotFoundException {
   883         throws java.io.IOException, ClassNotFoundException {
   881 
   884 
   882         // Read in size, and any hidden stuff
   885         // Read in size, and any hidden stuff
   883         s.defaultReadObject();
   886         s.defaultReadObject();