projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into next
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
notify
/
ListNotification.java
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
(file)
--- 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;
package net.pterodactylus.sone.notify;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
import net.pterodactylus.util.notify.TemplateNotification;
import net.pterodactylus.util.template.Template;
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<T> extends TemplateNotification {
/** The list of new elements. */
public class ListNotification<T> extends TemplateNotification {
/** The list of new elements. */
- private final List<T> elements =
Collections.synchronizedList(new ArrayList<T>()
);
+ private final List<T> elements =
new CopyOnWriteArrayList<T>(
);
/**
* Creates a new list notification.
/**
* Creates a new list notification.