diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2016-12-29 01:06:06 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2016-12-29 01:06:06 +0100 |
commit | fc6f02cdbafd7616f323bfe7c2c700dcba759414 (patch) | |
tree | b5ba4c7ba8bb197778a3481cf1f441eb973d7478 | |
parent | a85979c8b202de5f3044fc673ae05dd333c12128 (diff) | |
download | jgit-fc6f02cdbafd7616f323bfe7c2c700dcba759414.tar.gz jgit-fc6f02cdbafd7616f323bfe7c2c700dcba759414.zip |
[findBugs] Fix potential NPE in ObjectDirectoryTest
Change-Id: I0307d1e9bbc0bfc8172eed10f8e93788d6e2c8b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
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 |