< prev index next >
src/java.base/share/classes/java/time/OffsetDateTime.java
Print this page
@@ -182,10 +182,11 @@
}
/**
* Serialization version.
*/
+ @java.io.Serial
private static final long serialVersionUID = 2287754244819255394L;
/**
* The local date-time.
*/
@@ -1929,20 +1930,22 @@
* // the <a href="{@docRoot}/serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header
* </pre>
*
* @return the instance of {@code Ser}, not null
*/
+ @java.io.Serial
private Object writeReplace() {
return new Ser(Ser.OFFSET_DATE_TIME_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(ObjectOutput out) throws IOException {
< prev index next >