test/java/util/logging/LoggingDeadlock4.java
Print this page
rev 6099 : 8003380: Compiler warnings in logging test code
Summary: Use generics, suppress warnings where appropriate, remove unused imports, etc.
Reviewed-by: lancea, chegar
*** 28,38 ****
* @author Daniel D. Daugherty
* @build LoggingDeadlock4
* @run main/othervm/timeout=15 -Djava.awt.headless=true LoggingDeadlock4
*/
- import java.awt.Container;
import java.util.concurrent.CountDownLatch;
import java.util.logging.LogManager;
import java.util.logging.Logger;
public class LoggingDeadlock4 {
--- 28,37 ----
*** 66,76 ****
try {
barrier.await(); // wait for race to start
} catch (InterruptedException e) {
}
! LogManager manager = LogManager.getLogManager();
}
};
lmThread.start();
Thread logThread = new Thread("LoggerThread") {
--- 65,75 ----
try {
barrier.await(); // wait for race to start
} catch (InterruptedException e) {
}
! LogManager.getLogManager();
}
};
lmThread.start();
Thread logThread = new Thread("LoggerThread") {
*** 84,94 ****
try {
barrier.await(); // wait for race to start
} catch (InterruptedException e) {
}
! Logger foo = Logger.getLogger("foo logger");
}
};
logThread.start();
try {
--- 83,93 ----
try {
barrier.await(); // wait for race to start
} catch (InterruptedException e) {
}
! Logger.getLogger("foo logger");
}
};
logThread.start();
try {