Browse Source

[findBugs] Fix potential NPE in DirCacheCheckoutTest

Change-Id: I842cbdd14bf56cb2bd599255fe90a5a3aea0d304
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.7
Matthias Sohn 8 years ago
parent
commit
48b772bec1
  1. 3
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java

3
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java

@ -1705,7 +1705,8 @@ public class DirCacheCheckoutTest extends RepositoryTestCase {
+ " in workDir. ", buffer, i.get(path).getBytes());
nrFiles++;
} else if (file.isDirectory()) {
if (file.list().length == 0) {
String[] files = file.list();
if (files != null && files.length == 0) {
assertEquals("found unexpected empty folder for path "
+ path + " in workDir. ", "/", i.get(path));
nrFiles++;

Loading…
Cancel
Save