< prev index next >
src/java.base/share/classes/java/time/Period.java
Print this page
*** 138,147 ****
--- 138,148 ----
*/
public static final Period ZERO = new Period(0, 0, 0);
/**
* Serialization version.
*/
+ @java.io.Serial
private static final long serialVersionUID = -3587258372562876L;
/**
* The pattern for parsing.
*/
private static final Pattern PATTERN =
*** 1050,1069 ****
--- 1051,1072 ----
* out.writeInt(days);
* </pre>
*
* @return the instance of {@code Ser}, not null
*/
+ @java.io.Serial
private Object writeReplace() {
return new Ser(Ser.PERIOD_TYPE, this);
}
/**
* Defend against malicious streams.
*
* @param s the stream to read
* @throws java.io.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 >