From: Julien HENRY Date: Tue, 30 Jun 2015 07:59:29 +0000 (+0200) Subject: SONAR-6673 Do not try to load DefaultNotificationManager in preview mode X-Git-Tag: 5.1.2~6^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F403%2Fhead;p=sonarqube.git SONAR-6673 Do not try to load DefaultNotificationManager in preview mode --- diff --git a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java index eeb15214e81..d94cea2627f 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java @@ -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, diff --git a/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java b/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java index 368367441df..ad8fd09f46c 100644 --- a/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java +++ b/sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java @@ -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);