diff options
-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 { |