diff options
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(); |