< prev index next >

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

Print this page

        

@@ -132,10 +132,11 @@
         implements Temporal, TemporalAdjuster, Comparable<YearMonth>, Serializable {
 
     /**
      * Serialization version.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 4183400860270640070L;
     /**
      * Parser.
      */
     private static final DateTimeFormatter PARSER = new DateTimeFormatterBuilder()

@@ -1220,20 +1221,22 @@
      *  out.writeByte(month);
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
+    @java.io.Serial
     private Object writeReplace() {
         return new Ser(Ser.YEAR_MONTH_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 >