aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
index 41b2af1fafa..35672b85d2b 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
@@ -122,8 +122,9 @@ public final class SqaleRatingDecorator implements Decorator {
}
double sum = 0d;
for (Measure measure : measures) {
- if (measure.getData() != null) {
- sum += Double.parseDouble(measure.getData());
+ String data = measure.getData();
+ if (data != null) {
+ sum += Double.parseDouble(data);
}
}
return sum;