--- old/src/java.logging/share/classes/java/util/logging/LogManager.java 2019-04-18 16:03:15.000000000 -0700 +++ new/src/java.logging/share/classes/java/util/logging/LogManager.java 2019-04-18 16:03:14.000000000 -0700 @@ -39,8 +39,6 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; -import jdk.internal.access.JavaAWTAccess; -import jdk.internal.access.SharedSecrets; import sun.util.logging.internal.LoggingProviderImpl; import static jdk.internal.logger.DefaultLoggerFinder.isSystem; @@ -453,37 +451,9 @@ } } - // LoggerContext maps from AppContext - private WeakHashMap contextsMap = null; - - // Returns the LoggerContext for the user code (i.e. application or AppContext). - // Loggers are isolated from each AppContext. + // Returns the LoggerContext for the user code (i.e. application). private LoggerContext getUserContext() { - LoggerContext context = null; - - SecurityManager sm = System.getSecurityManager(); - JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess(); - if (sm != null && javaAwtAccess != null) { - // for each applet, it has its own LoggerContext isolated from others - 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<>(); - } - context = contextsMap.get(ecx); - if (context == null) { - // Create a new LoggerContext for the applet. - context = new LoggerContext(); - contextsMap.put(ecx, context); - } - } - } - } - // for standalone app, return userContext - return context != null ? context : userContext; + return userContext; } // The system context.