Skip to content

Commit 6bbfb05

Browse files
committed
Add readResolve to StorageOptions.DefaultClock
1 parent 3e57ae7 commit 6bbfb05

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import java.io.IOException;
3535
import java.io.InputStream;
3636
import java.io.InputStreamReader;
37+
import java.io.ObjectStreamException;
3738
import java.io.Serializable;
3839
import java.lang.reflect.Method;
3940
import java.net.HttpURLConnection;
@@ -124,6 +125,10 @@ private static class DefaultClock extends ServiceOptions.Clock implements Serial
124125
public long millis() {
125126
return System.currentTimeMillis();
126127
}
128+
129+
private Object readResolve() throws ObjectStreamException {
130+
return DEFAULT_TIME_SOURCE;
131+
}
127132
}
128133
}
129134

0 commit comments

Comments
 (0)