提交 0290f4a9 编写于 作者: S son

6636331: ConcurrentModificationException in AppContext code

Summary: Added synchronization to AppContext.getAppContexts()
Reviewed-by: art
上级 223f2c15
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册