]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6229 fix indexing of active rules
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 4 Mar 2015 22:52:29 +0000 (23:52 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 4 Mar 2015 22:52:29 +0000 (23:52 +0100)
server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java
server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java

index 66c8d2ff0ecf1d024bcdc0adbbcacb1a259f3091..1c03d4fb89caeff4b637c321f89bd342eb680efa 100644 (file)
@@ -847,6 +847,7 @@ class ServerComponents {
     DoPrivileged.execute(new DoPrivileged.Task() {
       @Override
       protected void doPrivileged() {
+        startupContainer.getComponentByType(IndexSynchronizer.class).executeDeprecated();
         startupContainer.startComponents();
         startupContainer.getComponentByType(IndexSynchronizer.class).execute();
         startupContainer.getComponentByType(ServerLifecycleNotifier.class).notifyStart();
index 6e0a4dca98afa41e3edf9436487a7b892a6c4a2a..95bafedf6eef7ff68d8e202692c8ae65cf050e30 100644 (file)
@@ -67,7 +67,7 @@ public class IndexSynchronizer {
     this.activityIndexer = activityIndexer;
   }
 
-  public void execute() {
+  public void executeDeprecated() {
     DbSession session = db.openSession(false);
     try {
       synchronize(session, db.ruleDao(), index.get(RuleIndex.class));
@@ -76,7 +76,9 @@ public class IndexSynchronizer {
     } finally {
       session.close();
     }
+  }
 
+  public void execute() {
     LOG.info("Index activities");
     activityIndexer.setEnabled(true).index();