aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-07-19 00:02:04 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-07-19 00:02:58 +0200
commit1f231f2cfcd47e66ca818cd1a8cbd93cc89af45d (patch)
tree0b8ffad8066e9dd1e45b4a872e7b246ade7b3ce9 /sonar-batch
parent18a85015feb7a27bee89bcfda4421b92f0a9b8c7 (diff)
downloadsonarqube-1f231f2cfcd47e66ca818cd1a8cbd93cc89af45d.tar.gz
sonarqube-1f231f2cfcd47e66ca818cd1a8cbd93cc89af45d.zip
SONAR-5417 Fix manual measures
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java b/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java
index 8467e5573d6..d0ada6e8b3c 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/referential/DefaultProjectReferentialsLoader.java
@@ -71,7 +71,9 @@ public class DefaultProjectReferentialsLoader implements ProjectReferentialsLoad
public ProjectReferentials load(ProjectReactor reactor, Settings settings, Languages languages) {
ProjectReferentials ref = new ProjectReferentials();
for (Metric m : sessionFactory.getSession().getResults(Metric.class, ENABLED, true)) {
- ref.metrics().add(new org.sonar.batch.protocol.input.Metric(m.getId(), m.getKey(), m.getType().name(), m.getBestValue(), m.isOptimizedBestValue()));
+ Boolean optimizedBestValue = m.isOptimizedBestValue();
+ ref.metrics().add(
+ new org.sonar.batch.protocol.input.Metric(m.getId(), m.getKey(), m.getType().name(), m.getBestValue(), optimizedBestValue != null ? optimizedBestValue : false));
}
String defaultName = settings.getString(ModuleQProfiles.SONAR_PROFILE_PROP);