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

Commit

Permalink
Merge 438c8f4 into 981acfa
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablissimo committed Oct 27, 2016
2 parents 981acfa + 438c8f4 commit 1015f33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
language: java
jdk:
- oraclejdk8

addons:
artifacts: true

after_success:
- mvn clean cobertura:cobertura coveralls:report
- mvn clean cobertura:cobertura coveralls:report
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.pablissimo.sonar</groupId>
<artifactId>sonar-typescript-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>0.93-SNAPSHOT</version>
<version>0.94-SNAPSHOT</version>

<name>TypeScript</name>
<description>Analyse TypeScript projects</description>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/com/pablissimo/sonar/LCOVParserImpl.java
Original file line number Diff line number Diff line change
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 1015f33

Please sign in to comment.