Browse Source

[findBugs] Fix potential NPE in ObjectDirectoryTest

Change-Id: I0307d1e9bbc0bfc8172eed10f8e93788d6e2c8b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.7
Matthias Sohn 8 years ago
parent
commit
fc6f02cdba
  1. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java

@ -162,7 +162,7 @@ public class ObjectDirectoryTest extends RepositoryTestCase {
return name.endsWith(".pack");
}
});
assertTrue(ret.length == 1);
assertTrue(ret != null && ret.length == 1);
Assume.assumeTrue(tmpFile.lastModified() == ret[0].lastModified());
// all objects are in a new packfile but we will not detect it

Loading…
Cancel
Save