diff options
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java index 17f04c8548..814e148db6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java @@ -529,9 +529,12 @@ public class PackInserterTest extends RepositoryTestCase { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - String name = file.getFileName().toString(); - if (!attrs.isDirectory() && badName.test(name)) { - bad.add(name); + Path fileName = file.getFileName(); + if (fileName != null) { + String name = fileName.toString(); + if (!attrs.isDirectory() && badName.test(name)) { + bad.add(name); + } } return FileVisitResult.CONTINUE; } |