mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-17 22:05:31 +00:00
6828273: javax/swing/system/6799345/TestShutdown.java test fails with RuntimeException
Reviewed-by: anthony, dcherepanov
This commit is contained in:
parent
42867588ae
commit
3ba822a482
@ -377,22 +377,22 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
|
||||
init();
|
||||
XWM.init();
|
||||
SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME);
|
||||
toolkitThread = new Thread(this, "AWT-XAWT");
|
||||
toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
toolkitThread.setDaemon(true);
|
||||
ThreadGroup mainTG = (ThreadGroup)AccessController.doPrivileged(
|
||||
new PrivilegedAction() {
|
||||
public Object run() {
|
||||
ThreadGroup currentTG =
|
||||
Thread.currentThread().getThreadGroup();
|
||||
ThreadGroup parentTG = currentTG.getParent();
|
||||
while (parentTG != null) {
|
||||
currentTG = parentTG;
|
||||
parentTG = currentTG.getParent();
|
||||
}
|
||||
return currentTG;
|
||||
}
|
||||
});
|
||||
|
||||
PrivilegedAction<Thread> action = new PrivilegedAction() {
|
||||
public Thread run() {
|
||||
ThreadGroup currentTG = Thread.currentThread().getThreadGroup();
|
||||
ThreadGroup parentTG = currentTG.getParent();
|
||||
while (parentTG != null) {
|
||||
currentTG = parentTG;
|
||||
parentTG = currentTG.getParent();
|
||||
}
|
||||
Thread thread = new Thread(currentTG, XToolkit.this, "AWT-XAWT");
|
||||
thread.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
thread.setDaemon(true);
|
||||
return thread;
|
||||
}
|
||||
};
|
||||
toolkitThread = AccessController.doPrivileged(action);
|
||||
toolkitThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ public class TestShutdown
|
||||
|
||||
while (!appcontextInitDone)
|
||||
{
|
||||
Thread.sleep(500);
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
|
||||
targetAppContext.dispose();
|
||||
@ -146,7 +146,6 @@ public class TestShutdown
|
||||
startGUI();
|
||||
}
|
||||
});
|
||||
stk.realSync();
|
||||
|
||||
// start multiple SwingWorkers
|
||||
while (!Thread.interrupted())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user