From 80346c2d8aaff33baf91f94817d9f22d09d94c6d Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 13 Aug 2014 14:36:10 +0200 Subject: Fix quality flaw --- .../src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sonar-batch') 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; -- cgit v1.2.3