]> source.dussan.org Git - jgit.git/commit
Fix FileSnapShot 74/2174/2
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Tue, 28 Dec 2010 18:01:46 +0000 (19:01 +0100)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 30 Dec 2010 00:15:59 +0000 (01:15 +0100)
commitc3f52c62a8b8b1fbed77954c8fa2353a35d05236
tree859cbf2ffb97e339635da25a757d80551aaee0ce
parent1f25f85f4dae2beb9fa77357eda4c3295eb9c9e4
Fix FileSnapShot

We cannot use SystemReader to get the time, unless we do that consistently,
which is harder to do and be sure we are really testing what we want.

Then we need to update our lastRead variable whenever we conclude that
our file is not racily clean according to lastRead. It may well be clean,
but we do not know that until we check the system clock again.

Finally add a test for this class.

Change-Id: I1894b032b9bd359d1b5325e5472d48e372599e4c
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileSnapshotTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileSnapshot.java