--- 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<>();
}