--- old/test/java/util/logging/LoggingDeadlock4.java Mon Dec 17 18:01:00 2012 +++ new/test/java/util/logging/LoggingDeadlock4.java Mon Dec 17 18:00:59 2012 @@ -23,11 +23,11 @@ /* * @test - * @bug 6977677 + * @bug 6977677 8004928 * @summary Deadlock between LogManager. and Logger.getLogger() * @author Daniel D. Daugherty - * @build LoggingDeadlock4 - * @run main/timeout=15 LoggingDeadlock4 + * @compile -XDignore.symbol.file LoggingDeadlock4.java + * @run main/othervm/timeout=15 LoggingDeadlock4 */ import java.awt.Container; @@ -40,21 +40,16 @@ private static CountDownLatch lmIsRunning = new CountDownLatch(1); private static CountDownLatch logIsRunning = new CountDownLatch(1); + // Create a sun.util.logging.PlatformLogger$JavaLogger object + // that has to be redirected when the LogManager class + // is initialized. This can cause a deadlock between + // LogManager. and Logger.getLogger(). + private static final sun.util.logging.PlatformLogger log = + sun.util.logging.PlatformLogger.getLogger("java.util.logging"); + public static void main(String[] args) { System.out.println("main: LoggingDeadlock4 is starting."); - // Loading the java.awt.Container class will create a - // sun.util.logging.PlatformLogger$JavaLogger object - // that has to be redirected when the LogManager class - // is initialized. This can cause a deadlock between - // LogManager. and Logger.getLogger(). - try { - Class.forName("java.awt.Container"); - } catch (ClassNotFoundException cnfe) { - throw new RuntimeException("Test failed: could not load" - + " java.awt.Container." + cnfe); - } - Thread lmThread = new Thread("LogManagerThread") { public void run() { // let main know LogManagerThread is running