Skip to content

Commit ac5c3bc

Browse files
author
Vladimir Kotal
committed
be more robust
1 parent b168782 commit ac5c3bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/util/FileExtraZipper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ private NullableNumLinesLOC findExtra(Map<String, NullableNumLinesLOC> byName, F
7777
private Map<String, NullableNumLinesLOC> indexExtraByName(List<NullableNumLinesLOC> extras) {
7878
Map<String, NullableNumLinesLOC> byPath = new HashMap<>();
7979
for (NullableNumLinesLOC extra : extras) {
80-
File f = new File(extra.getPath());
81-
String filename = f.getName();
82-
byPath.put(filename, extra);
80+
if (extra.getPath() != null) {
81+
File f = new File(extra.getPath());
82+
String filename = f.getName();
83+
byPath.put(filename, extra);
84+
}
8385
}
8486
return byPath;
8587
}

0 commit comments

Comments
 (0)