X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotification.java;h=6447990975beec379f04fb1e79e630fe40699268;hb=34f280d8ca0fd772f8cde42458362252e9c0c2f7;hp=d99424c0cdeb4b174128ec9562ad370067572c91;hpb=99888ce13cc17d49f5e217ab6f2c9ad5ef168792;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java index d99424c..6447990 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -141,7 +141,9 @@ public class ListNotification extends TemplateNotification { * The element to remove */ public void remove(T element) { - elements.remove(element); + while (elements.remove(element)) { + /* do nothing, just remove all instances of the element. */ + } if (elements.isEmpty()) { dismiss(); } @@ -152,9 +154,6 @@ public class ListNotification extends TemplateNotification { // ABSTRACTNOTIFICATION METHODS // - /** - * {@inheritDoc} - */ @Override public void dismiss() { super.dismiss(); @@ -165,9 +164,6 @@ public class ListNotification extends TemplateNotification { // OBJECT METHODS // - /** - * {@inheritDoc} - */ @Override public int hashCode() { int hashCode = super.hashCode(); @@ -177,9 +173,6 @@ public class ListNotification extends TemplateNotification { return hashCode; } - /** - * {@inheritDoc} - */ @Override public boolean equals(Object object) { if (!(object instanceof ListNotification)) {