< prev index next >

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

Print this page

        

*** 145,154 **** --- 145,155 ---- public static final int MAX_VALUE = 999_999_999; /** * Serialization version. */ + @java.io.Serial private static final long serialVersionUID = -23038383694477807L; /** * Parser. */ private static final DateTimeFormatter PARSER = new DateTimeFormatterBuilder()
*** 1095,1114 **** --- 1096,1117 ---- * out.writeInt(year); * </pre> * * @return the instance of {@code Ser}, not null */ + @java.io.Serial private Object writeReplace() { return new Ser(Ser.YEAR_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 >