changeset 7998:1143bb5e7064

8007611: logging behavior in applet changed Reviewed-by: alanb, jgish
author mchung
date Thu, 07 Feb 2013 09:41:47 -0800
parents af11c227a91e
children 5925630b7a7d
files src/share/classes/java/util/logging/LogManager.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/logging/LogManager.java	Tue Feb 05 22:56:47 2013 -0800
+++ b/src/share/classes/java/util/logging/LogManager.java	Thu Feb 07 09:41:47 2013 -0800
@@ -395,7 +395,10 @@
                         context = userContext;
                     } else {
                         context = new LoggerContext();
-                        context.addLocalLogger(manager.rootLogger);
+                        // during initialization, rootLogger is null when
+                        // instantiating itself RootLogger
+                        if (manager.rootLogger != null)
+                            context.addLocalLogger(manager.rootLogger);
                     }
                     javaAwtAccess.put(ecx, LoggerContext.class, context);
                 }