Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Update LCOVParserImpl.java
Browse files Browse the repository at this point in the history
Remove dep on Guava
  • Loading branch information
Pablissimo committed Oct 27, 2016
1 parent 981acfa commit 19a1c58
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/pablissimo/sonar/LCOVParserImpl.java
Expand Up @@ -21,7 +21,6 @@
*/
package com.pablissimo.sonar;

import com.google.common.base.Objects;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -197,7 +196,7 @@ void addBranch(Integer lineNumber, String branchNumber, Integer taken) {
branches.put(lineNumber, branchesForLine);
}
Integer currentValue = branchesForLine.get(branchNumber);
branchesForLine.put(branchNumber, Objects.firstNonNull(currentValue, 0) + taken);
branchesForLine.put(branchNumber, (currentValue == null ? 0 : currentValue) + taken);
}

void addLine(Integer lineNumber, Integer executionCount) {
Expand Down Expand Up @@ -235,4 +234,4 @@ private void checkLine(Integer lineNumber) {
}

}
}
}

0 comments on commit 19a1c58

Please sign in to comment.