aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-26 19:14:30 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-08-26 19:14:30 +0200
commit400386a676630f8ac4e51e568981c652bc11b56f (patch)
tree2fc382bb7ea948abe4f37d495feac3b8b5a482c3 /sonar-batch
parentc2d7e44f722f3c14af036553fdc001408f47343a (diff)
downloadsonarqube-400386a676630f8ac4e51e568981c652bc11b56f.tar.gz
sonarqube-400386a676630f8ac4e51e568981c652bc11b56f.zip
Fix some quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
index 9c255f2a13e..9ebc5db4624 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
@@ -50,8 +50,11 @@ public class QProfileDecorator implements Decorator {
}
UsedQProfiles used = new UsedQProfiles();
for (Measure childProfilesMeasure : context.getChildrenMeasures(CoreMetrics.QUALITY_PROFILES)) {
- UsedQProfiles childProfiles = UsedQProfiles.fromJson(childProfilesMeasure.getData());
- used.add(childProfiles);
+ String data = childProfilesMeasure.getData();
+ if (data != null) {
+ UsedQProfiles childProfiles = UsedQProfiles.fromJson(data);
+ used.add(childProfiles);
+ }
}
Measure detailsMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, used.toJson());