src/java.base/share/classes/java/util/EnumSet.java
changeset 57956 e0b8b019d2f5
parent 55697 7fd4446c02ee
child 58679 9c3209ff7550
--- a/src/java.base/share/classes/java/util/EnumSet.java	Thu Aug 29 18:52:30 2019 -0400
+++ b/src/java.base/share/classes/java/util/EnumSet.java	Thu Aug 29 16:31:34 2019 -0700
@@ -80,6 +80,7 @@
     implements Cloneable, java.io.Serializable
 {
     // declare EnumSet.class serialization compatibility with JDK 8
+    @java.io.Serial
     private static final long serialVersionUID = 1009687484059888093L;
 
     /**
@@ -449,6 +450,7 @@
          * held by this proxy
          */
         @SuppressWarnings("unchecked")
+        @java.io.Serial
         private Object readResolve() {
             // instead of cast to E, we should perhaps use elementType.cast()
             // to avoid injection of forged stream, but it will slow the
@@ -459,6 +461,7 @@
             return result;
         }
 
+        @java.io.Serial
         private static final long serialVersionUID = 362491234563181265L;
     }
 
@@ -471,6 +474,7 @@
      * @return a {@link SerializationProxy}
      * representing the state of this instance
      */
+    @java.io.Serial
     Object writeReplace() {
         return new SerializationProxy<>(this);
     }
@@ -479,6 +483,7 @@
      * @param s the stream
      * @throws java.io.InvalidObjectException always
      */
+    @java.io.Serial
     private void readObject(java.io.ObjectInputStream s)
         throws java.io.InvalidObjectException {
         throw new java.io.InvalidObjectException("Proxy required");