From: Matthias Sohn Date: Thu, 29 Dec 2016 00:04:25 +0000 (+0100) Subject: [findBugs] Fix potential NPE in GcPackRefsTest X-Git-Tag: v4.7.0.201704051617-r~138 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a85979c8b202de5f3044fc673ae05dd333c12128;p=jgit.git [findBugs] Fix potential NPE in GcPackRefsTest Change-Id: I273c06b9b2ce36c8232803cb7f02d7f846ed49e5 Signed-off-by: Matthias Sohn --- diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java index ea8dfa2939..22bec37620 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java @@ -46,6 +46,7 @@ package org.eclipse.jgit.internal.storage.file; import static java.lang.Integer.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; @@ -89,7 +90,7 @@ public class GcPackRefsTest extends GcTestCase { tr.branch(ref).commit().create(); String name = repo.findRef(ref).getName(); Path dir = repo.getDirectory().toPath().resolve(name).getParent(); - + assertNotNull(dir); gc.packRefs(); assertFalse(Files.exists(dir)); }