< prev index next >

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

Print this page

        

@@ -1257,11 +1257,11 @@
         public Spliterator<Map.Entry<K,V>> spliterator() {
             return new EntrySpliterator<>(IdentityHashMap.this, 0, -1, 0, 0);
         }
     }
 
-
+    @java.io.Serial
     private static final long serialVersionUID = 8188218128353913216L;
 
     /**
      * Saves the state of the {@code IdentityHashMap} instance to a stream
      * (i.e., serializes it).

@@ -1270,10 +1270,11 @@
      *          mappings) ({@code int}), followed by the key (Object) and
      *          value (Object) for each key-value mapping represented by the
      *          IdentityHashMap.  The key-value mappings are emitted in no
      *          particular order.
      */
+    @java.io.Serial
     private void writeObject(java.io.ObjectOutputStream s)
         throws java.io.IOException  {
         // Write out and any hidden stuff
         s.defaultWriteObject();
 

@@ -1293,10 +1294,11 @@
 
     /**
      * Reconstitutes the {@code IdentityHashMap} instance from a stream (i.e.,
      * deserializes it).
      */
+    @java.io.Serial
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.IOException, ClassNotFoundException  {
         // Read in any hidden stuff
         s.defaultReadObject();
 
< prev index next >