< prev index next >

src/java.base/share/classes/java/time/ZoneOffset.java

Print this page

        

@@ -141,10 +141,11 @@
      */
     private static final int MAX_SECONDS = 18 * SECONDS_PER_HOUR;
     /**
      * Serialization version.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 2357656521762053153L;
 
     /**
      * The time-zone offset for UTC, with an ID of 'Z'.
      */

@@ -761,20 +762,22 @@
      *  }
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
+    @java.io.Serial
     private Object writeReplace() {
         return new Ser(Ser.ZONE_OFFSET_TYPE, this);
     }
 
     /**
      * Defend against malicious streams.
      *
      * @param s the stream to read
      * @throws InvalidObjectException always
      */
+    @java.io.Serial
     private void readObject(ObjectInputStream s) throws InvalidObjectException {
         throw new InvalidObjectException("Deserialization via serialization delegate");
     }
 
     @Override
< prev index next >