]> source.dussan.org Git - jgit.git/commitdiff
[findBugs] Fix potential NPE in ObjectDirectoryTest 84/87784/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 29 Dec 2016 00:06:06 +0000 (01:06 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 29 Dec 2016 00:06:06 +0000 (01:06 +0100)
Change-Id: I0307d1e9bbc0bfc8172eed10f8e93788d6e2c8b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java

index 87554ae6a40d523a050905607b11d27f96c788aa..be1d8326c86a2ef225eceeef8b4f37cf87d7d4b2 100644 (file)
@@ -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