-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b21
-
x86
-
windows_xp
-
Verified
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
You known, the invokeLater/invokieAndWait in javax.swing.SwingUtilities is just a wrapper of java.awt.EventQueue. But the java doc for the codes is in inconsistent:
in SwingUtilities
----------------------
/**
* Causes <i>doRun.run()</i> to be executed asynchronously on the
* AWT event dispatching thread. ...
*/
public static void invokeLater(Runnable doRun) {
EventQueue.invokeLater(doRun);
}
/**
* Causes <code>doRun.run()</code> to be executed synchronously on the
* AWT event dispatching thread. ...
*/
public static void invokeAndWait(final Runnable doRun)
throws InterruptedException, InvocationTargetException
{
EventQueue.invokeAndWait(doRun);
}
one is asynchronously, another is synchronously.
in EventQueue
---------------------
/**
* @param runnable the <code>Runnable</code> whose <code>run</code>
* method should be executed
* synchronously on the <code>EventQueue</code>
*/
public static void invokeLater(Runnable runnable) {
Toolkit.getEventQueue().postEvent(
new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
}
/**
* @param runnable the <code>Runnable</code> whose <code>run</code>
* method should be executed
* synchronously on the <code>EventQueue</code>
*/
public static void invokeAndWait(Runnable runnable)
throws InterruptedException, InvocationTargetException {
Two are synchronously now.
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
You known, the invokeLater/invokieAndWait in javax.swing.SwingUtilities is just a wrapper of java.awt.EventQueue. But the java doc for the codes is in inconsistent:
in SwingUtilities
----------------------
/**
* Causes <i>doRun.run()</i> to be executed asynchronously on the
* AWT event dispatching thread. ...
*/
public static void invokeLater(Runnable doRun) {
EventQueue.invokeLater(doRun);
}
/**
* Causes <code>doRun.run()</code> to be executed synchronously on the
* AWT event dispatching thread. ...
*/
public static void invokeAndWait(final Runnable doRun)
throws InterruptedException, InvocationTargetException
{
EventQueue.invokeAndWait(doRun);
}
one is asynchronously, another is synchronously.
in EventQueue
---------------------
/**
* @param runnable the <code>Runnable</code> whose <code>run</code>
* method should be executed
* synchronously on the <code>EventQueue</code>
*/
public static void invokeLater(Runnable runnable) {
Toolkit.getEventQueue().postEvent(
new InvocationEvent(Toolkit.getDefaultToolkit(), runnable));
}
/**
* @param runnable the <code>Runnable</code> whose <code>run</code>
* method should be executed
* synchronously on the <code>EventQueue</code>
*/
public static void invokeAndWait(Runnable runnable)
throws InterruptedException, InvocationTargetException {
Two are synchronously now.
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-4617063 spec for EventQueue is totally contradictory
- Closed