< prev index next >
src/java.base/share/classes/java/time/Instant.java
Print this page
*** 243,252 ****
--- 243,253 ----
public static final Instant MAX = Instant.ofEpochSecond(MAX_SECOND, 999_999_999);
/**
* Serialization version.
*/
+ @java.io.Serial
private static final long serialVersionUID = -665713676816604388L;
/**
* The number of seconds from the epoch of 1970-01-01T00:00:00Z.
*/
*** 1340,1359 ****
--- 1341,1362 ----
* out.writeInt(nanos);
* </pre>
*
* @return the instance of {@code Ser}, not null
*/
+ @java.io.Serial
private Object writeReplace() {
return new Ser(Ser.INSTANT_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 >