X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotification.java;h=2f43c582c41231d16ec318e88a5ccc0de5898a70;hb=ee05a67b3f1e796b6c4bdcd709ef0983103c455f;hp=c7e5b7c31b0867819e4a16f7fac50fe3c990f730;hpb=ecf753a31601e558b681daab0598009fe9eec99a;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 c7e5b7c..2f43c58 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotification.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotification.java @@ -18,8 +18,8 @@ package net.pterodactylus.sone.notify; import java.util.ArrayList; -import java.util.Collections; import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; import net.pterodactylus.util.notify.TemplateNotification; import net.pterodactylus.util.template.Template; @@ -34,7 +34,7 @@ import net.pterodactylus.util.template.Template; public class ListNotification extends TemplateNotification { /** The list of new elements. */ - private final List elements = Collections.synchronizedList(new ArrayList()); + private final List elements = new CopyOnWriteArrayList(); /** * Creates a new list notification.