8131921: Pluggable EventQueue in modular JDK
authorserb
Tue, 25 Aug 2015 13:03:08 +0300
changeset 32486 39ceee403769
parent 32485 e00f713e6103
child 32487 7706754a1498
child 32489 a7cf1c08d3f8
8131921: Pluggable EventQueue in modular JDK Reviewed-by: azvegint, alexsch
jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Mon Aug 24 16:06:36 2015 +0400
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Tue Aug 25 13:03:08 2015 +0300
@@ -124,18 +124,7 @@
      * @param appContext AppContext to associate with the event queue
      */
     private static void initEQ(AppContext appContext) {
-        EventQueue eventQueue;
-
-        String eqName = System.getProperty("AWT.EventQueueClass",
-                "java.awt.EventQueue");
-
-        try {
-            eventQueue = (EventQueue)Class.forName(eqName).newInstance();
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.err.println("Failed loading " + eqName + ": " + e);
-            eventQueue = new EventQueue();
-        }
+        EventQueue eventQueue = new EventQueue();
         appContext.put(AppContext.EVENT_QUEUE_KEY, eventQueue);
 
         PostEventQueue postEventQueue = new PostEventQueue(eventQueue);