view patches/openjdk/6636331-appcontext_concurrentmodificationexception.patch @ 2925:c93101925a2e

Add dependencies of 8013196 and remove SharedSecrets fragment of 8013196 which causes a TCK regression. 2013-08-05 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * patches/openjdk/6636331-appcontext_concurrentmodificationexception.patch, * patches/openjdk/6636370-appcontext_simplification.patch, * patches/openjdk/7196533-timezone_bottleneck.patch: Backport additional patches which relate to changes in 8013196. * patches/openjdk/8013196-TimeZone_getDefault_throws_exception.patch: Drop SharedSecrets changes which cause a TCK regression.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Tue, 03 Sep 2013 18:35:49 +0100
parents
children
line wrap: on
line source

# HG changeset patch
# User son
# Date 1205416264 -10800
#      Thu Mar 13 16:51:04 2008 +0300
# Node ID c9ee9428aea9baa8e32691db1e14744002c70def
# Parent  bbd8e20d50523bbd89d10204e4f337a844f3cef1
6636331: ConcurrentModificationException in AppContext code
Summary: Added synchronization to AppContext.getAppContexts()
Reviewed-by: art

diff --git a/src/share/classes/sun/awt/AppContext.java b/src/share/classes/sun/awt/AppContext.java
--- openjdk/jdk/src/share/classes/sun/awt/AppContext.java
+++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java
@@ -146,7 +146,9 @@
      * 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