aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce-task-projectanalysis
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-ce-task-projectanalysis')
-rw-r--r--server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java
index bf5ae6856f6..5429d26887e 100644
--- a/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java
+++ b/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/step/PersistMeasuresStep.java
@@ -190,14 +190,14 @@ public class PersistMeasuresStep implements ComputationStep {
.map(MeasureToMeasureDto::getMeasureValue)
.filter(Objects::nonNull)
.forEach(value -> measureDto.addValue(metric.getKey(), value));
+ }
- if (component.getType() == Type.FILE) {
- if (computeDuplicationDataMeasure == null) {
- throw new IllegalStateException("ComputeDuplicationDataMeasure not initialized in container");
- }
- computeDuplicationDataMeasure.compute(component)
- .ifPresent(duplicationData -> measureDto.addValue(DUPLICATIONS_DATA_KEY, duplicationData));
+ if (component.getType() == Type.FILE) {
+ if (computeDuplicationDataMeasure == null) {
+ throw new IllegalStateException("ComputeDuplicationDataMeasure not initialized in container");
}
+ computeDuplicationDataMeasure.compute(component)
+ .ifPresent(duplicationData -> measureDto.addValue(DUPLICATIONS_DATA_KEY, duplicationData));
}
return measureDto;