From 0cf5dea8771b3a1de060200befaa41d8b3167a21 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 20 Jun 2014 18:06:44 +0200 Subject: [PATCH] SONAR-5007 Fix issue where rule registration was done before register technical debt model --- .../src/main/java/org/sonar/server/rule/RegisterRules.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java b/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java index c8c9c13ac46..5ddb76aabca 100644 --- a/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java +++ b/sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java @@ -42,6 +42,7 @@ import org.sonar.core.technicaldebt.db.CharacteristicDao; import org.sonar.core.technicaldebt.db.CharacteristicDto; import org.sonar.server.db.DbClient; import org.sonar.server.qualityprofile.RuleActivator; +import org.sonar.server.startup.RegisterDebtModel; import javax.annotation.CheckForNull; import javax.annotation.Nullable; @@ -62,8 +63,10 @@ public class RegisterRules implements Startable { private final DbClient dbClient; private final CharacteristicDao characteristicDao; - public RegisterRules(RuleDefinitionsLoader defLoader, RuleActivator ruleActivator, - DbClient dbClient) { + /** + * @param registerDebtModel used only to be started after init of the technical debt model + */ + public RegisterRules(RuleDefinitionsLoader defLoader, RuleActivator ruleActivator, DbClient dbClient, RegisterDebtModel registerDebtModel) { this(defLoader, ruleActivator, dbClient, System2.INSTANCE); } -- 2.39.5