RFR: JDK-8159155 Loading the class "sun.tools.jconsole.OutputViewer" shows a modal dialog
Staffan Larsen
staffan.larsen at oracle.com
Mon Jun 13 07:57:51 UTC 2016
Please review the small diff below - see the bug for details. This change will cause OutputViewer to misbehave if init() is called more than once. But since this is an internal class in jconsole, that restriction is not a problem
bug: https://bugs.openjdk.java.net/browse/JDK-8159155 <https://bugs.openjdk.java.net/browse/JDK-8159155>
Thanks,
/Staffan
diff --git a/src/jdk.jconsole/share/classes/sun/tools/jconsole/OutputViewer.java b/src/jdk.jconsole/share/classes/sun/tools/jconsole/OutputViewer.java
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/OutputViewer.java
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/OutputViewer.java
@@ -42,14 +42,11 @@
private static JFrame frame;
private static JTextArea ta;
- static {
+ public static void init() {
System.setOut(PipeListener.create("System.out"));
System.setErr(PipeListener.create("System.err"));
}
- // Dummy to cause class to be loaded
- public static void init() { }
-
private static void append(String s) {
if (frame == null) {
// FIXME: The frame title should be a localized string.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20160613/0810d444/attachment.html>
More information about the serviceability-dev
mailing list