Skip to content

Commit 8db9ae4

Browse files
#166 - Prevent NPE when accessing out of bound line (#13)
1 parent 6a2f0da commit 8db9ae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/java/org/owasp/benchmarkutils/score/BenchmarkScore.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ private static String getLine(File actual, int lineNum) {
12161216
for (int i = 0; i <= lineNum; i++) {
12171217
line = br.readLine();
12181218
}
1219-
while (line.length() == 0) { // Skip empty lines
1219+
while (line != null && line.length() == 0) { // Skip empty lines
12201220
line = br.readLine();
12211221
}
12221222
return line;

0 commit comments

Comments
 (0)