diff options
author | Ivan Frade <ifrade@google.com> | 2024-11-13 16:25:42 -0800 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-11-14 08:52:21 -0800 |
commit | c67393562be7e3db0e39cb2d3ff5f8192e2f2cd5 (patch) | |
tree | eff0e1ab28afc13b125c57f8a92fb0f854c50865 /org.eclipse.jgit.junit/src/org/eclipse/jgit/junit | |
parent | bb1f95e5652969f649bb9092cde6c256ae2cb46a (diff) | |
download | jgit-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.java | 6 |
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(); |