[findBugs] Fix potential NPE in GcPackRefsTest
Change-Id: I273c06b9b2ce36c8232803cb7f02d7f846ed49e5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
f63267134f
commit
a85979c8b2
|
@ -46,6 +46,7 @@
|
|||
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 void emptyRefDirectoryDeleted() throws Exception {
|
|||
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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue