diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2019-10-14 14:17:28 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-10-14 20:21:05 +0200 |
commit | 933b1ba56d517d71c03e917fd02d249363422829 (patch) | |
tree | e5da4cbdab6248eb13394bce6c700fbc77e11094 /sonar-plugin-api | |
parent | ab6fd46a1f0936c3d8e05ada5b984819dae4283b (diff) | |
download | sonarqube-933b1ba56d517d71c03e917fd02d249363422829.tar.gz sonarqube-933b1ba56d517d71c03e917fd02d249363422829.zip |
fix quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java | 3 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java index 7e6d3b39d8c..da78c278de8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.List; import java.util.stream.Collectors; import javax.annotation.CheckForNull; +import javax.annotation.Nullable; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.ToStringBuilder; import org.sonar.api.profiles.RulesProfile; @@ -52,7 +53,7 @@ public class ActiveRule implements Cloneable { * @deprecated visibility should be reduced to protected or package */ @Deprecated - public ActiveRule(RulesProfile profile, Rule rule, RulePriority severity) { + public ActiveRule(RulesProfile profile, Rule rule, @Nullable RulePriority severity) { this.rule = rule; this.overriddenSeverity = severity; if (severity == null && rule != null) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java index 05071d3e5b5..17698dfc9ce 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java @@ -226,7 +226,7 @@ public class Rule { * @param severity severity to set, if null, uses the default priority. * @since 2.5 */ - public Rule setSeverity(RulePriority severity) { + public Rule setSeverity(@Nullable RulePriority severity) { if (severity == null) { this.priority = DEFAULT_PRIORITY; } else { |