diff --git a/src/main/java/ru/ulstu/conference/service/ConferenceService.java b/src/main/java/ru/ulstu/conference/service/ConferenceService.java index a9e3fac..1bfdebd 100644 --- a/src/main/java/ru/ulstu/conference/service/ConferenceService.java +++ b/src/main/java/ru/ulstu/conference/service/ConferenceService.java @@ -134,11 +134,6 @@ public class ConferenceService { public boolean isCurrentUserParticipant(List conferenceUsers) { - for (ConferenceUser participant : conferenceUsers) { - if (participant.getUser().getId() == userService.getCurrentUser().getId()) { - return true; - } - } - return false; + return conferenceUsers.stream().anyMatch(participant -> participant.getUser().equals(userService.getCurrentUser())); } }