Skip to content

Commit

Permalink
Merge pull request #152 from GLundh/cl
Browse files Browse the repository at this point in the history
Fix: Broken line counting
  • Loading branch information
rsandell authored Mar 18, 2022
2 parents f091d23 + 7758cd4 commit 11119fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ public static List<FoundFailureCause> scanSingleLinePatterns(List<FailureCause>
timerThread.start();
try {
long startTime = System.currentTimeMillis();
int currentLine = 1;
int currentLine = 0;
String line;
while ((line = reader.readLine()) != null) {
currentLine++;
for (FailureCause cause : causes) {
for (Indication indication : cause.getIndications()) {
try {
Expand All @@ -198,7 +199,6 @@ public static List<FoundFailureCause> scanSingleLinePatterns(List<FailureCause>
throw e;
}
}
currentLine++;
timerThread.touch();
if (System.currentTimeMillis() - startTime > adjustedFileTimeout) {
logger.warning("File timeout scanning for indication '" + indication.toString() + "'"
Expand Down

0 comments on commit 11119fc

Please sign in to comment.