]> source.dussan.org Git - sonarqube.git/commitdiff
fix quality flaws
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 14 Oct 2019 12:17:28 +0000 (14:17 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 14 Oct 2019 18:21:05 +0000 (20:21 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java

index 7e6d3b39d8c32d2ebf0718c0715eeac9cdd0a8ca..da78c278de88928d62dc09aa8489dcad7f159f22 100644 (file)
@@ -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) {
index 05071d3e5b5c014d282da810a9d665d1d3c66c9c..17698dfc9ce3fefdcef3588b34bbcaefff6487b9 100644 (file)
@@ -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 {