aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-02-19 11:15:55 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2014-02-19 11:16:03 +0100
commit0331ddb1fd35a2259b042b704522610195951488 (patch)
treed7612c239ff02e25f01e4e564c6494f22a9534db /sonar-plugin-api
parenta6885c554195e3904a0b459a34c64a942ddacec7 (diff)
downloadsonarqube-0331ddb1fd35a2259b042b704522610195951488.tar.gz
sonarqube-0331ddb1fd35a2259b042b704522610195951488.zip
Add missing @CheckForNull on RulesProfile
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java
index 04fea5cee06..7836f493b89 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java
@@ -29,6 +29,7 @@ import org.sonar.api.rules.ActiveRule;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RulePriority;
+import javax.annotation.CheckForNull;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
@@ -262,6 +263,7 @@ public class RulesProfile implements Cloneable {
*
* @since 2.5
*/
+ @CheckForNull
public String getParentName() {
return parentName;
}
@@ -331,6 +333,7 @@ public class RulesProfile implements Cloneable {
*
* @return an active rule from a plugin key and a rule key if the rule is activated, null otherwise
*/
+ @CheckForNull
public ActiveRule getActiveRule(String repositoryKey, String ruleKey) {
for (ActiveRule activeRule : activeRules) {
if (StringUtils.equals(activeRule.getRepositoryKey(), repositoryKey) && StringUtils.equals(activeRule.getRuleKey(), ruleKey) && activeRule.isEnabled()) {
@@ -343,6 +346,7 @@ public class RulesProfile implements Cloneable {
/**
* Note: disabled rules are excluded.
*/
+ @CheckForNull
public ActiveRule getActiveRuleByConfigKey(String repositoryKey, String configKey) {
for (ActiveRule activeRule : activeRules) {
if (StringUtils.equals(activeRule.getRepositoryKey(), repositoryKey) && StringUtils.equals(activeRule.getConfigKey(), configKey) && activeRule.isEnabled()) {
@@ -355,7 +359,7 @@ public class RulesProfile implements Cloneable {
/**
* Note: disabled rules are excluded.
*/
-
+ @CheckForNull
public ActiveRule getActiveRule(Rule rule) {
return getActiveRule(rule.getRepositoryKey(), rule.getKey());
}