diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-10-06 20:43:53 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-10-07 00:02:09 +0200 |
commit | d999545733b0f53d9a726c5c83256cc8e881dd83 (patch) | |
tree | 5f90ca747329974d260d471f94514f41fb4cb486 /plugins | |
parent | 42b27a86a33b63b0f72ff37c289ca7e41473ed7a (diff) | |
download | sonarqube-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.java | 6 |
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(); |