Skip to content

Commit 7a9b5a3

Browse files
author
Vladimir Kotal
committed
check for null
1 parent 5fd40f0 commit 7a9b5a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/org/opensolaris/opengrok/history/RepositoryFactoryTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ private void testNotWorkingRepository(String repoPath, String propName)
6262
String origPropValue = System.setProperty(propName, "/foo/bar/nonexistent");
6363
File root = new File(repository.getSourceRoot(), repoPath);
6464
Repository repo = RepositoryFactory.getRepository(root);
65-
System.setProperty(propName, origPropValue);
65+
if (origPropValue != null) {
66+
System.setProperty(propName, origPropValue);
67+
}
6668
assertFalse(repo.isWorking());
6769
}
6870

0 commit comments

Comments
 (0)