]> source.dussan.org Git - jgit.git/commit
Use FS#lastModified instead of File#lastModified 07/79407/5
authorMasaya Suzuki <masayasuzuki@google.com>
Sun, 21 Aug 2016 22:27:30 +0000 (15:27 -0700)
committerAndrey Loskutov <loskutov@gmx.de>
Wed, 24 Aug 2016 07:07:08 +0000 (09:07 +0200)
commitedd8ad4d04897830f08b6793a9493c70c0e9b87a
tree4675dd5c84a81b9b4289850a1a4c908d90716204
parentda9eef85e7fff1c1c64c4302b897d20aff24b448
Use FS#lastModified instead of File#lastModified

This fixes the tests failed in JDK8.

FS uses java.nio API to get file attributes. The timestamps obtained
from that API are more precise than the ones from
java.io.File#lastModified() since Java8.

This difference accidentally makes JGit detect newly added files as
smudged. Use the precised timestamp to avoid this false positive.

Bug: 500058
Change-Id: I9e587583c85cb6efa7562ad6c5f26577869a2e7c
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcTestCase.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/ResolveMergerTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java