Browse Source

Add a check in fstick that the reference file exists

This helps avoiding some stupid thinkos.

Change-Id: I5b386cd9c6bf0e11f270bb2b8cfaac66ce9b341b
stable-2.2
Robin Rosenberg 12 years ago committed by Shawn O. Pearce
parent
commit
243e14d051
  1. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryTestCase.java

@ -371,6 +371,8 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase {
public static long fsTick(File lastFile) throws InterruptedException,
IOException {
long sleepTime = 1;
if (lastFile != null && !lastFile.exists())
throw new FileNotFoundException(lastFile.getPath());
File tmp = File.createTempFile("FileTreeIteratorWithTimeControl", null);
try {
long startTime = (lastFile == null) ? tmp.lastModified() : lastFile

Loading…
Cancel
Save