aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-06-04 19:14:49 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-06-04 19:14:49 +0200
commit9b81a46f6d32355444ad89293275e8b42a86f991 (patch)
tree9a73b9ef2803ba71e2fe449f286e6e2e1d6ccc33 /sonar-core/src
parentb3070fe1c1fc8c15cf8ba5e0433fec598572bdc4 (diff)
downloadsonarqube-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.java5
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