< prev index next >

src/java.base/share/classes/java/lang/Class.java

Print this page

        

@@ -3419,10 +3419,11 @@
                         .map(c -> c == null ? "null" : c.getName())
                         .collect(Collectors.joining(",", "(", ")")));
     }
 
     /** use serialVersionUID from JDK 1.1 for interoperability */
+    @java.io.Serial
     private static final long serialVersionUID = 3206093459760846163L;
 
 
     /**
      * Class Class is special cased within the Serialization Stream Protocol.

@@ -3438,10 +3439,11 @@
      * is written into the stream. Future references to the class descriptor
      * are written as references to the initial class descriptor instance.
      *
      * @see java.io.ObjectStreamClass
      */
+    @java.io.Serial
     private static final ObjectStreamField[] serialPersistentFields =
         new ObjectStreamField[0];
 
 
     /**
< prev index next >