Error Prone is flagging Date-API as obsolete and recommends to migrate
to Instant and LocalDate. Given that more JGit users starting to migrate
to new Time API, offer getInstant method.
Change-Id: Ie010b76d1c213cd0a645f716783ed2d57fc78071
import java.io.IOException;
import java.io.OutputStream;
import java.security.MessageDigest;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
return new Date(mockSystemReader.getCurrentTime());
}
+ /**
+ * Get instant
+ *
+ * @return current instant.
+ * @since 6.8
+ */
+ public Instant getInstant() {
+ return Instant.ofEpochMilli(mockSystemReader.getCurrentTime());
+ }
+
/**
* Get timezone
*