diff options
author | Godin <mandrikov@gmail.com> | 2010-12-14 17:20:29 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-14 17:20:29 +0000 |
commit | 2b69c849ecddd36c632d9834cd190d4ad0447766 (patch) | |
tree | d1e9ee5ed7110912ba4c07d7fbd7ff8bac580f9f /sonar-plugin-api/src | |
parent | 92be7c08f72733cf28d0fb11522f4f9ec8687e32 (diff) | |
download | sonarqube-2b69c849ecddd36c632d9834cd190d4ad0447766.tar.gz sonarqube-2b69c849ecddd36c632d9834cd190d4ad0447766.zip |
SONAR-1829: Use severity instead of priority
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java | 13 |
1 files 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; } |