Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2019-08-20 10:16:54 -0400
committerMichael Keppler2019-08-24 10:53:43 -0400
commit9fee37efeefc3aa0e13e1f6c447e3cb517ee51af (patch)
treebc9b5d0bfdc349c0cb08721a70d5b3e42ae09a11 /org.eclipse.egit.ui/src/org/eclipse
parent1416f9a5733c118fc8dcb7ca762281abb5d76ac6 (diff)
downloadegit-9fee37efeefc3aa0e13e1f6c447e3cb517ee51af.tar.gz
egit-9fee37efeefc3aa0e13e1f6c447e3cb517ee51af.tar.xz
egit-9fee37efeefc3aa0e13e1f6c447e3cb517ee51af.zip
Fix deprecations caused by Instant based DirCacheEntry
Call the Instant based DirCacheEntry methods (instead of epoch based methods) to avoid deprecation warnings. To avoid bigger refactorings, the tests simply convert to epoch afterwards and continue to assert based on the epoch. Change-Id: I99d47f49adc778861b83ec8b255f090361ff31f5 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
index b83827a14..eeb02c6ba 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
@@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.file.Files;
+import java.time.Instant;
import org.eclipse.compare.CompareEditorInput;
import org.eclipse.compare.CompareUI;
@@ -1114,7 +1115,7 @@ public class CompareUtils {
ent.setFileMode(FileMode.REGULAR_FILE);
ent.setLength(content.limit());
- ent.setLastModified(System.currentTimeMillis());
+ ent.setLastModified(Instant.now());
try {
ByteArrayInputStream in = new ByteArrayInputStream(
content.array(), 0, content.limit());

Back to the top