mirror of
https://github.com/google/nomulus
synced 2026-07-30 20:12:48 +00:00
Make our Clock util Serializable
It doesn't entirely make semantic sense, since the actual state of the SystemClock isn't being preserved, but it makes injection into serializable classes (e.g. mapreduces) much simpler, so it's worth doing. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201755949
This commit is contained in:
@@ -19,7 +19,6 @@ import static org.joda.time.DateTimeZone.UTC;
|
||||
import static org.joda.time.Duration.millis;
|
||||
|
||||
import google.registry.util.Clock;
|
||||
import java.io.Serializable;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
import org.joda.time.DateTime;
|
||||
@@ -28,7 +27,7 @@ import org.joda.time.ReadableInstant;
|
||||
|
||||
/** A mock clock for testing purposes that supports telling, setting, and advancing the time. */
|
||||
@ThreadSafe
|
||||
public final class FakeClock implements Clock, Serializable {
|
||||
public final class FakeClock implements Clock {
|
||||
|
||||
private static final long serialVersionUID = 675054721685304599L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user