mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2024-11-28 05:35:28 +01:00
Prevent ConcurrentModifcationExceptions.
See http://pastebin.com/UBvGSFs9/
This commit is contained in:
parent
d643690eef
commit
b3322b35c1
@ -198,6 +198,11 @@ public class BackgroundCompiler {
|
|||||||
|
|
||||||
synchronized (listenerLock) {
|
synchronized (listenerLock) {
|
||||||
list = listeners.get(key);
|
list = listeners.get(key);
|
||||||
|
|
||||||
|
// Prevent ConcurrentModificationExceptions
|
||||||
|
if (list != null) {
|
||||||
|
list = Lists.newArrayList(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only execute the listeners if there is a list
|
// Only execute the listeners if there is a list
|
||||||
|
Loading…
Reference in New Issue
Block a user