From 5a0253f2dea14767fc9db008b6ffc4bb77a8c273 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 30 Jun 2015 09:59:29 +0200 Subject: [PATCH] SONAR-6673 Do not try to load DefaultNotificationManager in preview mode --- .../org/sonar/batch/scan/ProjectScanContainer.java | 2 +- .../notification/DefaultNotificationManager.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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); -- 2.39.5