From: Matthias Sohn Date: Thu, 29 Dec 2016 00:06:06 +0000 (+0100) Subject: [findBugs] Fix potential NPE in ObjectDirectoryTest X-Git-Tag: v4.7.0.201704051617-r~137 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fc6f02cdbafd7616f323bfe7c2c700dcba759414;p=jgit.git [findBugs] Fix potential NPE in ObjectDirectoryTest Change-Id: I0307d1e9bbc0bfc8172eed10f8e93788d6e2c8b4 Signed-off-by: Matthias Sohn --- diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java index 87554ae6a4..be1d8326c8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java +++ b/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