mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-17 22:05:31 +00:00
4887645: Remove "awt.threadgroup" system property
Reviewed-by: art, anthony
This commit is contained in:
parent
ed5a7ec3f8
commit
b719528ce0
@ -102,26 +102,6 @@ public abstract class SunToolkit extends Toolkit
|
||||
public final static int MAX_BUTTONS_SUPPORTED = 20;
|
||||
|
||||
public SunToolkit() {
|
||||
/* If awt.threadgroup is set to class name the instance of
|
||||
* this class is created (should be subclass of ThreadGroup)
|
||||
* and EventDispatchThread is created inside of it
|
||||
*
|
||||
* If loaded class overrides uncaughtException instance
|
||||
* handles all uncaught exception on EventDispatchThread
|
||||
*/
|
||||
ThreadGroup threadGroup = null;
|
||||
String tgName = System.getProperty("awt.threadgroup", "");
|
||||
|
||||
if (tgName.length() != 0) {
|
||||
try {
|
||||
Constructor ctor = Class.forName(tgName).
|
||||
getConstructor(new Class[] {String.class});
|
||||
threadGroup = (ThreadGroup)ctor.newInstance(new Object[] {"AWT-ThreadGroup"});
|
||||
} catch (Exception e) {
|
||||
System.err.println("Failed loading " + tgName + ": " + e);
|
||||
}
|
||||
}
|
||||
|
||||
Runnable initEQ = new Runnable() {
|
||||
public void run () {
|
||||
EventQueue eventQueue;
|
||||
@ -144,17 +124,7 @@ public abstract class SunToolkit extends Toolkit
|
||||
}
|
||||
};
|
||||
|
||||
if (threadGroup != null) {
|
||||
Thread eqInitThread = new Thread(threadGroup, initEQ, "EventQueue-Init");
|
||||
eqInitThread.start();
|
||||
try {
|
||||
eqInitThread.join();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
initEQ.run();
|
||||
}
|
||||
initEQ.run();
|
||||
}
|
||||
|
||||
public boolean useBufferPerWindow() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user