diff options
Diffstat (limited to 'org.eclipse.jgit.junit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java | 30 |
1 files changed, 14 insertions, 16 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 8de386e344..89f2530a31 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 @@ -171,22 +171,20 @@ public class MockSystemReader extends SystemReader { /** {@inheritDoc} */ @Override public MonotonicClock getClock() { - return new MonotonicClock() { - @Override - public ProposedTimestamp propose() { - long t = getCurrentTime(); - return new ProposedTimestamp() { - @Override - public long read(TimeUnit unit) { - return unit.convert(t, TimeUnit.MILLISECONDS); - } - - @Override - public void blockUntil(Duration maxWait) { - // Do not wait. - } - }; - } + return () -> { + long t = getCurrentTime(); + return new ProposedTimestamp() { + + @Override + public long read(TimeUnit unit) { + return unit.convert(t, TimeUnit.MILLISECONDS); + } + + @Override + public void blockUntil(Duration maxWait) { + // Do not wait. + } + }; }; } |