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 |
101 implements ChronoLocalDateTime<D>, Temporal, TemporalAdjuster, Serializable { |
101 implements ChronoLocalDateTime<D>, Temporal, TemporalAdjuster, Serializable { |
102 |
102 |
103 /** |
103 /** |
104 * Serialization version. |
104 * Serialization version. |
105 */ |
105 */ |
|
106 @java.io.Serial |
106 private static final long serialVersionUID = 4556003607393004514L; |
107 private static final long serialVersionUID = 4556003607393004514L; |
107 /** |
108 /** |
108 * Hours per day. |
109 * Hours per day. |
109 */ |
110 */ |
110 static final int HOURS_PER_DAY = 24; |
111 static final int HOURS_PER_DAY = 24; |
407 * out.witeObject(toLocalTime()); |
408 * out.witeObject(toLocalTime()); |
408 * </pre> |
409 * </pre> |
409 * |
410 * |
410 * @return the instance of {@code Ser}, not null |
411 * @return the instance of {@code Ser}, not null |
411 */ |
412 */ |
|
413 @java.io.Serial |
412 private Object writeReplace() { |
414 private Object writeReplace() { |
413 return new Ser(Ser.CHRONO_LOCAL_DATE_TIME_TYPE, this); |
415 return new Ser(Ser.CHRONO_LOCAL_DATE_TIME_TYPE, this); |
414 } |
416 } |
415 |
417 |
416 /** |
418 /** |
417 * Defend against malicious streams. |
419 * Defend against malicious streams. |
418 * |
420 * |
419 * @param s the stream to read |
421 * @param s the stream to read |
420 * @throws InvalidObjectException always |
422 * @throws InvalidObjectException always |
421 */ |
423 */ |
|
424 @java.io.Serial |
422 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
425 private void readObject(ObjectInputStream s) throws InvalidObjectException { |
423 throw new InvalidObjectException("Deserialization via serialization delegate"); |
426 throw new InvalidObjectException("Deserialization via serialization delegate"); |
424 } |
427 } |
425 |
428 |
426 void writeExternal(ObjectOutput out) throws IOException { |
429 void writeExternal(ObjectOutput out) throws IOException { |