jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
changeset 27932 654c0f23c1c0
parent 27799 097b1d6f6894
child 29739 3966f5f6a6fd
equal deleted inserted replaced
27931:9089cd529a79 27932:654c0f23c1c0
   456 
   456 
   457         SecurityManager sm = System.getSecurityManager();
   457         SecurityManager sm = System.getSecurityManager();
   458         JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
   458         JavaAWTAccess javaAwtAccess = SharedSecrets.getJavaAWTAccess();
   459         if (sm != null && javaAwtAccess != null) {
   459         if (sm != null && javaAwtAccess != null) {
   460             // for each applet, it has its own LoggerContext isolated from others
   460             // for each applet, it has its own LoggerContext isolated from others
   461             synchronized (javaAwtAccess) {
   461             final Object ecx = javaAwtAccess.getAppletContext();
   462                 // find the AppContext of the applet code
   462             if (ecx != null) {
   463                 // will be null if we are in the main app context.
   463                 synchronized (javaAwtAccess) {
   464                 final Object ecx = javaAwtAccess.getAppletContext();
   464                     // find the AppContext of the applet code
   465                 if (ecx != null) {
   465                     // will be null if we are in the main app context.
   466                     if (contextsMap == null) {
   466                     if (contextsMap == null) {
   467                         contextsMap = new WeakHashMap<>();
   467                         contextsMap = new WeakHashMap<>();
   468                     }
   468                     }
   469                     context = contextsMap.get(ecx);
   469                     context = contextsMap.get(ecx);
   470                     if (context == null) {
   470                     if (context == null) {