< prev index next >

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

Print this page

        

@@ -155,10 +155,11 @@
     public static final LocalDate EPOCH = LocalDate.of(1970, 1, 1);
 
     /**
      * Serialization version.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 2942565459149668126L;
     /**
      * The number of days in a 400 year cycle.
      */
     private static final int DAYS_PER_CYCLE = 146097;

@@ -2198,20 +2199,22 @@
      *  out.writeByte(day);
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
+    @java.io.Serial
     private Object writeReplace() {
         return new Ser(Ser.LOCAL_DATE_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");
     }
 
     void writeExternal(DataOutput out) throws IOException {
< prev index next >