aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-11-13 16:25:42 -0800
committerIvan Frade <ifrade@google.com>2024-11-14 08:52:21 -0800
commitc67393562be7e3db0e39cb2d3ff5f8192e2f2cd5 (patch)
treeeff0e1ab28afc13b125c57f8a92fb0f854c50865 /org.eclipse.jgit.junit/src/org/eclipse/jgit/junit
parentbb1f95e5652969f649bb9092cde6c256ae2cb46a (diff)
downloadjgit-c67393562be7e3db0e39cb2d3ff5f8192e2f2cd5.tar.gz
jgit-c67393562be7e3db0e39cb2d3ff5f8192e2f2cd5.zip
SystemReader#now: make it a concrete method
Abstract methods break subclasses (e.g. DelegateSystemReader in gerrit). Updating jgit and gerrit is simpler if we do not add them. I am not sure why some methods are abstract and others dont, but now() can be a concrete method. Make now() concrete. Implement it by default based on getCurrentTime(), so subclasses overriding that method get the same value. Change-Id: I697749f8cba698c5388ed13ebdc2b238d6259358
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse/jgit/junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java6
1 files changed, 0 insertions, 6 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
index bf236ab17d..38f0d0b2cb 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
@@ -18,7 +18,6 @@ import java.lang.reflect.Field;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.Duration;
-import java.time.Instant;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.util.HashMap;
@@ -205,11 +204,6 @@ public class MockSystemReader extends SystemReader {
}
@Override
- public Instant now() {
- return Instant.ofEpochMilli(now);
- }
-
- @Override
public MonotonicClock getClock() {
return () -> {
long t = getCurrentTime();