]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 Fix issue where rule registration was done before register technical debt...
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 20 Jun 2014 16:06:44 +0000 (18:06 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 20 Jun 2014 16:06:44 +0000 (18:06 +0200)
sonar-server/src/main/java/org/sonar/server/rule/RegisterRules.java

index c8c9c13ac46dad1a003ddf8fbb446fca8c07de3b..5ddb76aabca93131753441b2bebd519728cad3c2 100644 (file)
@@ -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);
   }