< prev index next >

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

Print this page

        

@@ -151,10 +151,11 @@
     public static final LocalDateTime MAX = LocalDateTime.of(LocalDate.MAX, LocalTime.MAX);
 
     /**
      * Serialization version.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 6207766400415563566L;
 
     /**
      * The date part.
      */

@@ -1983,20 +1984,22 @@
      *  // the <a href="{@docRoot}/serialized-form.html#java.time.LocalTime">time</a> excluding the one byte header
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
+    @java.io.Serial
     private Object writeReplace() {
         return new Ser(Ser.LOCAL_DATE_TIME_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 >