Prevent ConcurrentModifcationExceptions.

See http://pastebin.com/UBvGSFs9/
This commit is contained in:
Kristian Stangeland 2013-03-28 21:58:06 -04:00
parent d643690eef
commit b3322b35c1

View File

@ -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