jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
changeset 27932 654c0f23c1c0
parent 27799 097b1d6f6894
child 29739 3966f5f6a6fd
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Thu Dec 04 18:54:37 2014 -0800
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Fri Dec 05 12:20:51 2014 +0100
@@ -458,11 +458,11 @@
         JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
         if (sm != null && javaAwtAccess != null) {
             // for each applet, it has its own LoggerContext isolated from others
-            synchronized (javaAwtAccess) {
-                // find the AppContext of the applet code
-                // will be null if we are in the main app context.
-                final Object ecx = javaAwtAccess.getAppletContext();
-                if (ecx != null) {
+            final Object ecx = javaAwtAccess.getAppletContext();
+            if (ecx != null) {
+                synchronized (javaAwtAccess) {
+                    // find the AppContext of the applet code
+                    // will be null if we are in the main app context.
                     if (contextsMap == null) {
                         contextsMap = new WeakHashMap<>();
                     }