[findBugs] Fix potential NPE in GcPackRefsTest

Change-Id: I273c06b9b2ce36c8232803cb7f02d7f846ed49e5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2016-12-29 01:04:25 +01:00
parent f63267134f
commit a85979c8b2
1 changed files with 2 additions and 1 deletions

View File

@ -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));
}