diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-01-29 17:37:57 +0100 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-01-29 18:01:15 +0100 |
commit | 8d9eb9edf1ea931aabd94a4e6fe1cbe5343e93a3 (patch) | |
tree | ee90db58acf7dda6be3772d1845d954b31122dea /sonar-core | |
parent | 6d28b25606431eef5b911c4900a7ea4fd764b3df (diff) | |
download | sonarqube-8d9eb9edf1ea931aabd94a4e6fe1cbe5343e93a3.tar.gz sonarqube-8d9eb9edf1ea931aabd94a4e6fe1cbe5343e93a3.zip |
SONAR-3959 Update NotifDispatchers to use new NotifManager method
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/notification/DefaultNotificationManager.java | 3 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java | 6 |
2 files changed, 5 insertions, 4 deletions
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 e7bf3d62ebb..49a276f2614 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 @@ -20,6 +20,7 @@ package org.sonar.core.notification; import com.google.common.collect.HashMultimap; +import com.google.common.collect.Multimap; import com.google.common.collect.SetMultimap; import org.sonar.api.database.DatabaseSession; import org.sonar.api.notifications.Notification; @@ -102,7 +103,7 @@ public class DefaultNotificationManager implements NotificationManager { /** * {@inheritDoc} */ - public SetMultimap<String, NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, Integer resourceId) { + public Multimap<String, NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, Integer resourceId) { String dispatcherKey = dispatcher.getKey(); SetMultimap<String, NotificationChannel> recipients = HashMultimap.create(); diff --git a/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java index 75a7b5f9d5b..242173b961f 100644 --- a/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/notification/DefaultNotificationManagerTest.java @@ -20,7 +20,7 @@ package org.sonar.core.notification; import com.google.common.collect.Lists; -import com.google.common.collect.SetMultimap; +import com.google.common.collect.Multimap; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; @@ -98,7 +98,7 @@ public class DefaultNotificationManagerTest extends AbstractDbUnitTestCase { when(propertiesDao.findUsersForNotification("NewViolations", "Twitter", null)).thenReturn(Lists.newArrayList("user3")); when(propertiesDao.findUsersForNotification("NewAlerts", "Twitter", null)).thenReturn(Lists.newArrayList("user4")); - SetMultimap<String, NotificationChannel> multiMap = manager.findSubscribedRecipientsForDispatcher(dispatcher, 45); + Multimap<String, NotificationChannel> multiMap = manager.findSubscribedRecipientsForDispatcher(dispatcher, 45); assertThat(multiMap.entries()).hasSize(4); Map<String, Collection<NotificationChannel>> map = multiMap.asMap(); @@ -116,7 +116,7 @@ public class DefaultNotificationManagerTest extends AbstractDbUnitTestCase { when(propertiesDao.findUsersForNotification("NewViolations", "Twitter", null)).thenReturn(Lists.newArrayList("user3")); when(propertiesDao.findUsersForNotification("NewAlerts", "Twitter", null)).thenReturn(Lists.newArrayList("user4")); - SetMultimap<String, NotificationChannel> multiMap = manager.findSubscribedRecipientsForDispatcher(dispatcher, null); + Multimap<String, NotificationChannel> multiMap = manager.findSubscribedRecipientsForDispatcher(dispatcher, null); assertThat(multiMap.entries()).hasSize(3); Map<String, Collection<NotificationChannel>> map = multiMap.asMap(); |