diff options
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"); |