diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-04 19:14:49 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-06-04 19:14:49 +0200 |
commit | 9b81a46f6d32355444ad89293275e8b42a86f991 (patch) | |
tree | 9a73b9ef2803ba71e2fe449f286e6e2e1d6ccc33 /sonar-core/src | |
parent | b3070fe1c1fc8c15cf8ba5e0433fec598572bdc4 (diff) | |
download | sonarqube-9b81a46f6d32355444ad89293275e8b42a86f991.tar.gz sonarqube-9b81a46f6d32355444ad89293275e8b42a86f991.zip |
SONAR-3755 Add security check on issues action
Diffstat (limited to 'sonar-core/src')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java index 7df853a0744..2e6a8245dc1 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/DefaultIssueQueryResult.java @@ -104,7 +104,10 @@ public class DefaultIssueQueryResult implements IssueQueryResult { @Override public Issue first() { - return issues != null && !issues.isEmpty() ? issues.get(0) : null; + if (issues != null && !issues.isEmpty()) { + return issues.get(0); + } + throw new IllegalArgumentException("No issue"); } @Override |