From 2b69c849ecddd36c632d9834cd190d4ad0447766 Mon Sep 17 00:00:00 2001 From: Godin Date: Tue, 14 Dec 2010 17:20:29 +0000 Subject: [PATCH] SONAR-1829: Use severity instead of priority --- .../java/org/sonar/api/profiles/RulesProfile.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 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 895bea88eba..ccc5e9d2dbd 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,11 +29,11 @@ import org.sonar.api.rules.ActiveRule; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RulePriority; +import javax.persistence.*; + import java.util.ArrayList; import java.util.List; -import javax.persistence.*; - /** * This class is badly named. It should be "QualityProfile". Indeed it does not relate only to rules but to metric thresholds too. */ @@ -274,16 +274,13 @@ public class RulesProfile implements Cloneable { } /** - * - * @param rule - * @param optionalPriority if null, then the default rule priority is used - * @return + * @param optionalSeverity if null, then the default rule severity is used */ - public ActiveRule activateRule(Rule rule, RulePriority optionalPriority) { + public ActiveRule activateRule(Rule rule, RulePriority optionalSeverity) { ActiveRule activeRule = new ActiveRule(); activeRule.setRule(rule); activeRule.setRulesProfile(this); - activeRule.setSeverity(optionalPriority == null ? rule.getSeverity() : optionalPriority); + activeRule.setSeverity(optionalSeverity == null ? rule.getSeverity() : optionalSeverity); activeRules.add(activeRule); return activeRule; } -- 2.39.5