diff --git a/src/main/java/com/ModeratorElection/MainView.java b/src/main/java/com/ModeratorElection/MainView.java index 40bd714..d7f7e6b 100644 --- a/src/main/java/com/ModeratorElection/MainView.java +++ b/src/main/java/com/ModeratorElection/MainView.java @@ -40,8 +40,9 @@ public class MainView extends VerticalLayout { Button electNow = new Button("Elect!", buttonClickEvent -> { try { - ArrayList checkboxSelectedMembers = new ArrayList(checkboxGroup.getSelectedItems()); - Notification moderatorNotification = new Notification() + ArrayList checkboxSelectedMembers = new ArrayList<>(checkboxGroup.getSelectedItems()); + new Notification(); + Notification moderatorNotification = Notification .show("Nächster Moderator: " + electMember(checkboxSelectedMembers)); moderatorNotification.setPosition(Notification.Position.BOTTOM_CENTER); } catch(Exception exceptionEvent) {