diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-07-24 14:56:08 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-07-24 14:56:38 +0200 |
commit | 7e3e925505cf950e564bb4bc877cab0012640988 (patch) | |
tree | 7d0a67cca2c274cb629d56b2c72e59cf7472934b /sonar-batch | |
parent | 1e46f499f5879f330039482437682cd9e3016ccb (diff) | |
download | sonarqube-7e3e925505cf950e564bb4bc877cab0012640988.tar.gz sonarqube-7e3e925505cf950e564bb4bc877cab0012640988.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scan2/AnalysisPublisher.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalysisPublisher.java b/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalysisPublisher.java index 757f320f559..b10ac5524dd 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalysisPublisher.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan2/AnalysisPublisher.java @@ -132,8 +132,9 @@ public final class AnalysisPublisher { for (Measure<?> measure : measureCache.byModule(def.getKey())) { jsonWriter.beginObject() .prop("metricKey", measure.metric().key()); - if (measure.inputFile() != null) { - jsonWriter.prop("filePath", measure.inputFile().relativePath()); + InputFile inputFile = measure.inputFile(); + if (inputFile != null) { + jsonWriter.prop("filePath", inputFile.relativePath()); } jsonWriter.prop("value", String.valueOf(measure.value())) .endObject(); |