< prev index next >
src/java.base/share/classes/java/time/Clock.java
Print this page
*** 639,648 ****
--- 639,649 ----
* Implementation of a clock that adds an offset to an underlying clock.
*/
static final class OffsetClock extends Clock implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 2007484719125426256L;
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private final Clock baseClock;
private final Duration offset;
OffsetClock(Clock baseClock, Duration offset) {
this.baseClock = baseClock;
*** 690,699 ****
--- 691,701 ----
* Implementation of a clock that adds an offset to an underlying clock.
*/
static final class TickClock extends Clock implements Serializable {
@java.io.Serial
private static final long serialVersionUID = 6504659149906368850L;
+ @SuppressWarnings("serial") // Not statically typed as Serializable
private final Clock baseClock;
private final long tickNanos;
TickClock(Clock baseClock, long tickNanos) {
this.baseClock = baseClock;
< prev index next >