equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
136 public static final OffsetTime MAX = LocalTime.MAX.atOffset(ZoneOffset.MIN); |
136 public static final OffsetTime MAX = LocalTime.MAX.atOffset(ZoneOffset.MIN); |
137 |
137 |
138 /** |
138 /** |
139 * Serialization version. |
139 * Serialization version. |
140 */ |
140 */ |
|
141 @java.io.Serial |
141 private static final long serialVersionUID = 7264499704384272492L; |
142 private static final long serialVersionUID = 7264499704384272492L; |
142 |
143 |
143 /** |
144 /** |
144 * The local date-time. |
145 * The local date-time. |
145 */ |
146 */ |
1408 * // the <a href="{@docRoot}/serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header |
1409 * // the <a href="{@docRoot}/serialized-form.html#java.time.ZoneOffset">offset</a> excluding the one byte header |
1409 * </pre> |
1410 * </pre> |
1410 * |
1411 * |
1411 * @return the instance of {@code Ser}, not null |
1412 * @return the instance of {@code Ser}, not null |
1412 */ |
1413 */ |
|
1414 @java.io.Serial |
1413 private Object writeReplace() { |
1415 private Object writeReplace() { |
1414 return new Ser(Ser.OFFSET_TIME_TYPE, this); |
1416 return new Ser(Ser.OFFSET_TIME_TYPE, this); |
1415 } |
1417 } |
1416 |
1418 |
1417 /** |
1419 /** |
1418 * Defend against malicious streams. |
1420 * Defend against malicious streams. |
1419 * |
1421 * |
1420 * @param s the stream to read |
1422 * @param s the stream to read |
1421 * @throws InvalidObjectException always |
1423 * @throws InvalidObjectException always |
1422 */ |
1424 */ |
|
1425 @java.io.Serial |
1423 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
1426 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
1424 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1427 throw new InvalidObjectException("Deserialization via serialization delegate"); |
1425 } |
1428 } |
1426 |
1429 |
1427 void writeExternal(ObjectOutput out) throws IOException { |
1430 void writeExternal(ObjectOutput out) throws IOException { |