< prev index next >

src/java.base/share/classes/java/time/chrono/JapaneseEra.java

Print this page

        

@@ -164,10 +164,11 @@
     private static final int N_ERA_CONSTANTS = REIWA.getValue() + ERA_OFFSET;
 
     /**
      * Serialization version.
      */
+    @java.io.Serial
     private static final long serialVersionUID = 1466499369062886794L;
 
     // array for the singleton JapaneseEra instances
     private static final JapaneseEra[] KNOWN_ERAS;
 

@@ -424,10 +425,11 @@
      * 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");
     }
 
     //-----------------------------------------------------------------------

@@ -440,10 +442,11 @@
      *  out.writeInt(getValue());
      * </pre>
      *
      * @return the instance of {@code Ser}, not null
      */
+    @java.io.Serial
     private Object writeReplace() {
         return new Ser(Ser.JAPANESE_ERA_TYPE, this);
     }
 
     void writeExternal(DataOutput out) throws IOException {
< prev index next >