[findBugs] Fix potential NPE in ObjectDirectoryTest

Change-Id: I0307d1e9bbc0bfc8172eed10f8e93788d6e2c8b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2016-12-29 01:06:06 +01:00
parent a85979c8b2
commit fc6f02cdba
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ public boolean accept(File dir, String name) {
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