src/share/classes/java/awt/EventDispatchThread.java

Print this page

        

*** 33,43 **** import java.security.AccessController; import sun.security.action.GetPropertyAction; import sun.awt.AWTAutoShutdown; import sun.awt.SunToolkit; ! import java.util.Vector; import sun.util.logging.PlatformLogger; import sun.awt.dnd.SunDragSourceContextPeer; import sun.awt.EventQueueDelegate; --- 33,43 ---- import java.security.AccessController; import sun.security.action.GetPropertyAction; import sun.awt.AWTAutoShutdown; import sun.awt.SunToolkit; ! import java.util.ArrayList; import sun.util.logging.PlatformLogger; import sun.awt.dnd.SunDragSourceContextPeer; import sun.awt.EventQueueDelegate;
*** 64,78 **** private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread"); private EventQueue theQueue; private boolean doDispatch = true; - private boolean threadDeathCaught = false; private static final int ANY_EVENT = -1; ! private Vector<EventFilter> eventFilters = new Vector<EventFilter>(); EventDispatchThread(ThreadGroup group, String name, EventQueue queue) { super(group, name); setEventQueue(queue); } --- 64,77 ---- private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread"); private EventQueue theQueue; private boolean doDispatch = true; private static final int ANY_EVENT = -1; ! private ArrayList<EventFilter> eventFilters = new ArrayList<EventFilter>(); EventDispatchThread(ThreadGroup group, String name, EventQueue queue) { super(group, name); setEventQueue(queue); }
*** 92,102 **** return true; } }); } finally { EventQueue eq = getEventQueue(); ! if (eq.detachDispatchThread(this) || threadDeathCaught) { break; } } } } --- 91,101 ---- return true; } }); } finally { EventQueue eq = getEventQueue(); ! if (eq.detachDispatchThread(this) || isInterrupted()) { break; } } } }
*** 214,226 **** } return true; } catch (ThreadDeath death) { ! threadDeathCaught = true; ! return false; ! } catch (InterruptedException interruptedException) { return false; // AppContext.dispose() interrupts all // Threads in the AppContext --- 213,223 ---- } return true; } catch (ThreadDeath death) { ! throw death; } catch (InterruptedException interruptedException) { return false; // AppContext.dispose() interrupts all // Threads in the AppContext