]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6673 Do not try to load DefaultNotificationManager in preview mode 403/head
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 30 Jun 2015 07:59:29 +0000 (09:59 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 30 Jun 2015 08:01:39 +0000 (10:01 +0200)
sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java
sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java

index eeb15214e81e49deca567f9252fd60ea7309e037..d94cea2627f37ebcb72dba9b15e2db1a8540462f 100644 (file)
@@ -123,7 +123,6 @@ public class ProjectScanContainer extends ComponentContainer {
       new ProjectRepositoriesProvider(),
       DefaultResourceCreationLock.class,
       CodeColorizers.class,
-      DefaultNotificationManager.class,
       MetricProvider.class,
       ProjectConfigurator.class,
       DefaultIndex.class,
@@ -191,6 +190,7 @@ public class ProjectScanContainer extends ComponentContainer {
       ResourcePersister.class,
       SourcePersister.class,
       ResourceKeyMigration.class,
+      DefaultNotificationManager.class,
 
       ProjectScmRepositoryLoader.class,
 
index 368367441df60b320ffcd5802630dbdaf9ce4633..ad8fd09f46c582c559c40dc29207ba682fe3157b 100644 (file)
@@ -25,8 +25,14 @@ import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.SetMultimap;
+import java.io.IOException;
+import java.io.InvalidClassException;
+import java.util.Arrays;
+import java.util.List;
+import javax.annotation.Nullable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.sonar.api.batch.RequiresDB;
 import org.sonar.api.notifications.Notification;
 import org.sonar.api.notifications.NotificationChannel;
 import org.sonar.api.notifications.NotificationDispatcher;
@@ -36,16 +42,10 @@ import org.sonar.core.notification.db.NotificationQueueDao;
 import org.sonar.core.notification.db.NotificationQueueDto;
 import org.sonar.core.properties.PropertiesDao;
 
-import javax.annotation.Nullable;
-
-import java.io.IOException;
-import java.io.InvalidClassException;
-import java.util.Arrays;
-import java.util.List;
-
 /**
  * @since 2.10
  */
+@RequiresDB
 public class DefaultNotificationManager implements NotificationManager {
 
   private static final Logger LOG = LoggerFactory.getLogger(DefaultNotificationManager.class);