6636331: ConcurrentModificationException in AppContext code
Added synchronization to AppContext.getAppContexts() Reviewed-by: art
This commit is contained in:
parent
59d9653ecf
commit
794142ee36
@ -146,7 +146,9 @@ public final class AppContext {
|
||||
* Returns a set containing all <code>AppContext</code>s.
|
||||
*/
|
||||
public static Set<AppContext> getAppContexts() {
|
||||
return new HashSet<AppContext>(threadGroup2appContext.values());
|
||||
synchronized (threadGroup2appContext) {
|
||||
return new HashSet<AppContext>(threadGroup2appContext.values());
|
||||
}
|
||||
}
|
||||
|
||||
/* The main "system" AppContext, used by everything not otherwise
|
||||
|
Loading…
Reference in New Issue
Block a user