aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-10-06 20:43:53 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2015-10-07 00:02:09 +0200
commitd999545733b0f53d9a726c5c83256cc8e881dd83 (patch)
tree5f90ca747329974d260d471f94514f41fb4cb486 /plugins
parent42b27a86a33b63b0f72ff37c289ca7e41473ed7a (diff)
downloadsonarqube-d999545733b0f53d9a726c5c83256cc8e881dd83.tar.gz
sonarqube-d999545733b0f53d9a726c5c83256cc8e881dd83.zip
Create a shortcut to add secondary issue locations
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java
index dec367142af..49ba26109d1 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java
@@ -144,7 +144,11 @@ public class MultilineIssuesSensor implements Sensor {
.message("Flow step #" + flowNum);
flowLocations.add(newLocation);
}
- newIssue.addFlow(flowLocations);
+ if (flowLocations.size() == 1) {
+ newIssue.addLocation(flowLocations.get(0));
+ } else {
+ newIssue.addFlow(flowLocations);
+ }
}
}
newIssue.save();