< prev index next >

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

Print this page

        

*** 132,141 **** --- 132,142 ---- 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,1239 **** --- 1221,1242 ---- * 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 >