< prev index next >

src/java.base/share/classes/java/util/ArrayDeque.java

Print this page

        

@@ -1155,10 +1155,11 @@
         } catch (CloneNotSupportedException e) {
             throw new AssertionError();
         }
     }
 
+    @java.io.Serial
     private static final long serialVersionUID = 2340985798034038923L;
 
     /**
      * Saves this deque to a stream (that is, serializes it).
      *

@@ -1166,10 +1167,11 @@
      * @throws java.io.IOException if an I/O error occurs
      * @serialData The current size ({@code int}) of the deque,
      * followed by all of its elements (each an object reference) in
      * first-to-last order.
      */
+    @java.io.Serial
     private void writeObject(java.io.ObjectOutputStream s)
             throws java.io.IOException {
         s.defaultWriteObject();
 
         // Write out size

@@ -1190,10 +1192,11 @@
      * @param s the stream
      * @throws ClassNotFoundException if the class of a serialized object
      *         could not be found
      * @throws java.io.IOException if an I/O error occurs
      */
+    @java.io.Serial
     private void readObject(java.io.ObjectInputStream s)
             throws java.io.IOException, ClassNotFoundException {
         s.defaultReadObject();
 
         // Read in size and allocate array
< prev index next >