< prev index next >
src/java.base/share/classes/java/time/ZoneId.java
Print this page
@@ -252,10 +252,11 @@
entry("HST", "-10:00")
);
/**
* Serialization version.
*/
+ @java.io.Serial
private static final long serialVersionUID = 8352817235686L;
//-----------------------------------------------------------------------
/**
* Gets the system default time-zone.
@@ -622,10 +623,11 @@
* 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");
}
/**
@@ -653,10 +655,11 @@
* ID has a valid format, but is not in the known set of region-based IDs.
*
* @return the instance of {@code Ser}, not null
*/
// this is here for serialization Javadoc
+ @java.io.Serial
private Object writeReplace() {
return new Ser(Ser.ZONE_REGION_TYPE, this);
}
abstract void write(DataOutput out) throws IOException;
< prev index next >