diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-25 00:16:09 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-02-25 07:44:16 +0100 |
commit | d4beaec49895945d23d509d1502790794b008d56 (patch) | |
tree | e10aef01542a6de8a4b00b985870dfdcdbc3a700 /sonar-batch | |
parent | 2dc09dd0800e0fca575133775e4b97dc5f711104 (diff) | |
download | sonarqube-d4beaec49895945d23d509d1502790794b008d56.tar.gz sonarqube-d4beaec49895945d23d509d1502790794b008d56.zip |
SONAR-2218 Add CoverageMeasuresBuilder to API + add Metric.Builder, first step to get an immutable Metric class
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java b/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java index f80e487d868..97942ef8f30 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/MeasurePersister.java @@ -29,7 +29,6 @@ import org.sonar.api.database.model.Snapshot; import org.sonar.api.measures.Measure; import org.sonar.api.measures.Metric; import org.sonar.api.measures.RuleMeasure; -import org.sonar.api.resources.Project; import org.sonar.api.resources.Resource; import org.sonar.api.resources.ResourceUtils; import org.sonar.api.rules.Rule; @@ -90,12 +89,12 @@ public final class MeasurePersister { return measure.getId() == null && metric.isOptimizedBestValue() == Boolean.TRUE && metric.getBestValue() != null && - (measure.getValue()==null || NumberUtils.compare(metric.getBestValue(), measure.getValue()) == 0) && + (measure.getValue() == null || NumberUtils.compare(metric.getBestValue(), measure.getValue()) == 0) && measure.getAlertStatus() == null && measure.getDescription() == null && measure.getTendency() == null && measure.getUrl() == null && - measure.getData() == null && + !measure.hasData() && (measure.getVariation1() == null || NumberUtils.compare(measure.getVariation1().doubleValue(), 0.0) == 0) && (measure.getVariation2() == null || NumberUtils.compare(measure.getVariation2().doubleValue(), 0.0) == 0) && (measure.getVariation3() == null || NumberUtils.compare(measure.getVariation3().doubleValue(), 0.0) == 0) && |