aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-08 10:03:04 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-08 10:23:06 +0200
commitd8a2f59a61e32d547c378197efd53edeab3e9f4b (patch)
tree7b9c41340ee53fd704d33d64ca253fcd3faad309 /plugins
parentc204a7295375a26ba83c33ccde0ba3121a3d388e (diff)
downloadsonarqube-d8a2f59a61e32d547c378197efd53edeab3e9f4b.tar.gz
sonarqube-d8a2f59a61e32d547c378197efd53edeab3e9f4b.zip
Fix quality flaws
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java
index 50a64524079..501a447b0a5 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/AbstractNewCoverageFileAnalyzer.java
@@ -35,6 +35,8 @@ import org.sonar.batch.components.Period;
import org.sonar.batch.components.TimeMachineConfiguration;
import org.sonar.core.DryRunIncompatible;
+import javax.annotation.Nullable;
+
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -161,7 +163,7 @@ public abstract class AbstractNewCoverageFileAnalyzer implements Decorator {
context.saveMeasure(newUncoveredConditions);
}
- private Map<Integer, Integer> parseCountByLine(Measure measure) {
+ private Map<Integer, Integer> parseCountByLine(@Nullable Measure measure) {
if (measure != null && measure.hasData()) {
return KeyValueFormat.parseIntInt(measure.getData());
}
@@ -176,7 +178,7 @@ public abstract class AbstractNewCoverageFileAnalyzer implements Decorator {
Integer newConditions;
Integer newCoveredConditions;
- PeriodStruct(int index, Date date) {
+ PeriodStruct(int index, @Nullable Date date) {
this.index = index;
this.date = date;
}
@@ -188,7 +190,7 @@ public abstract class AbstractNewCoverageFileAnalyzer implements Decorator {
newCoveredConditions = null;
}
- void analyze(Date lineDate, int hits, int conditions, int coveredConditions) {
+ void analyze(@Nullable Date lineDate, int hits, int conditions, int coveredConditions) {
if (lineDate == null) {
// TODO warning