diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java | 8 | ||||
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/notification/DefaultNotificationManager.java | 10 |
2 files changed, 3 insertions, 15 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java index 8a521e5f097..5bb3c9fc8a6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/SetSeverityAction.java @@ -23,7 +23,6 @@ import com.google.common.base.Strings; import java.util.Collection; import java.util.Map; import org.sonar.api.issue.Issue; -import org.sonar.api.issue.condition.Condition; import org.sonar.api.issue.condition.IsUnResolved; import org.sonar.api.server.ServerSide; import org.sonar.api.web.UserRole; @@ -42,12 +41,7 @@ public class SetSeverityAction extends Action { super(SET_SEVERITY_KEY); this.issueUpdater = issueUpdater; this.userSession = userSession; - super.setConditions(new IsUnResolved(), new Condition() { - @Override - public boolean matches(Issue issue) { - return isCurrentUserIssueAdmin(issue.projectKey()); - } - }); + super.setConditions(new IsUnResolved(), issue -> isCurrentUserIssueAdmin(issue.projectKey())); } private boolean isCurrentUserIssueAdmin(String projectKey) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/notification/DefaultNotificationManager.java b/server/sonar-server/src/main/java/org/sonar/server/notification/DefaultNotificationManager.java index bceb9aa8c4a..83548fbd631 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/notification/DefaultNotificationManager.java +++ b/server/sonar-server/src/main/java/org/sonar/server/notification/DefaultNotificationManager.java @@ -20,7 +20,6 @@ package org.sonar.server.notification; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Function; import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; @@ -78,12 +77,7 @@ public class DefaultNotificationManager implements NotificationManager { @Override public void scheduleForSending(List<Notification> notification) { - notificationQueueDao.insert(Lists.transform(notification, new Function<Notification, NotificationQueueDto>() { - @Override - public NotificationQueueDto apply(Notification notification) { - return NotificationQueueDto.toNotificationQueueDto(notification); - } - })); + notificationQueueDao.insert(Lists.transform(notification, NotificationQueueDto::toNotificationQueueDto)); } /** @@ -130,7 +124,7 @@ public class DefaultNotificationManager implements NotificationManager { */ @Override public Multimap<String, NotificationChannel> findSubscribedRecipientsForDispatcher(NotificationDispatcher dispatcher, - @Nullable String projectUuid) { + @Nullable String projectUuid) { String dispatcherKey = dispatcher.getKey(); SetMultimap<String, NotificationChannel> recipients = HashMultimap.create(); |