diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-04-04 11:07:52 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-04-04 11:09:06 +0200 |
commit | 2e24fb395108f50e96db34398e1f9458b3f1c4c1 (patch) | |
tree | ff08a760fdf6e58998448880054f5a714e552763 /plugins | |
parent | 0d284e6c1a5105c396ab85273de2af30b6d63847 (diff) | |
download | sonarqube-2e24fb395108f50e96db34398e1f9458b3f1c4c1.tar.gz sonarqube-2e24fb395108f50e96db34398e1f9458b3f1c4c1.zip |
SONAR-3320 Add an extension point to observe property changes
Diffstat (limited to 'plugins')
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProject.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProject.java index 4f2d637658b..d0db106f056 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProject.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProject.java @@ -42,7 +42,7 @@ public class NewViolationsOnMyFavouriteProject extends NotificationDispatcher { @Override public void dispatch(Notification notification, Context context) { if (StringUtils.equals(notification.getType(), "new-violations")) { - Integer projectId = Integer.parseInt(notification.getFieldValue("projectId")); + Long projectId = Long.parseLong(notification.getFieldValue("projectId")); List<String> userLogins = propertiesDao.findUserIdsForFavouriteResource(projectId); for (String userLogin : userLogins) { context.addUser(userLogin); diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProjectTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProjectTest.java index ed2de225074..5a4b1adce3a 100644 --- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProjectTest.java +++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/newviolations/NewViolationsOnMyFavouriteProjectTest.java @@ -49,7 +49,7 @@ public class NewViolationsOnMyFavouriteProjectTest { public void shouldDispatchToUsersWhoHaveFlaggedProjectAsFavourite() { NotificationDispatcher.Context context = mock(NotificationDispatcher.Context.class); PropertiesDao propertiesDao = mock(PropertiesDao.class); - when(propertiesDao.findUserIdsForFavouriteResource(34)).thenReturn(Lists.newArrayList("user1", "user2")); + when(propertiesDao.findUserIdsForFavouriteResource(34L)).thenReturn(Lists.newArrayList("user1", "user2")); NewViolationsOnMyFavouriteProject dispatcher = new NewViolationsOnMyFavouriteProject(propertiesDao); Notification notification = new Notification("new-violations").setFieldValue("projectId", "34"); |