aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-09-29 09:05:19 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-09-30 16:28:08 +0200
commitf5aa4163eb68aa987923d62bda08a8c49450cb1c (patch)
treee9260e7b6fff8c061032398fe9b11a03bf9bfc72 /sonar-plugin-api
parenta23a7ec4f48244c193b48aec84127701618a31cc (diff)
downloadsonarqube-f5aa4163eb68aa987923d62bda08a8c49450cb1c.tar.gz
sonarqube-f5aa4163eb68aa987923d62bda08a8c49450cb1c.zip
SONAR-6818 Split batch/project WS in several simpler WS
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java
index 2104b3d4e50..d16fb2d3bb9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/internal/DefaultActiveRules.java
@@ -65,7 +65,11 @@ public class DefaultActiveRules implements ActiveRules {
@Override
public ActiveRule find(RuleKey ruleKey) {
- return activeRulesByRepositoryAndKey.containsKey(ruleKey.repository()) ? activeRulesByRepositoryAndKey.get(ruleKey.repository()).get(ruleKey.rule()) : null;
+ Map<String, ActiveRule> map = activeRulesByRepositoryAndKey.get(ruleKey.repository());
+ if(map != null) {
+ return map.get(ruleKey.rule());
+ }
+ return null;
}
@Override