Robot patchlet
Tom Tromey
tromey@redhat.com
Tue Apr 26 17:06:00 GMT 2005
Tom F. --
I noticed last night that Robot calls a static method, invokeAndWait,
in a non-static way. This is ok, but a little bit confusing. I want
to check in the appended, what do you think? Is there some reason to
find the system event queue here?
Tom
Index: java/awt/Robot.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Robot.java,v
retrieving revision 1.6
diff -u -r1.6 Robot.java
--- java/awt/Robot.java 22 Feb 2005 07:07:46 -0000 1.6
+++ java/awt/Robot.java 26 Apr 2005 16:39:31 -0000
@@ -394,10 +394,9 @@
throw new IllegalThreadStateException ("Robot: waitForIdle called from "
+ "the event dispatch thread");
- EventQueue q = Toolkit.getDefaultToolkit ().getSystemEventQueue ();
try
{
- q.invokeAndWait (new Runnable () { public void run () { } });
+ EventQueue.invokeAndWait (new Runnable () { public void run () { } });
}
catch (InterruptedException e)
{
More information about the Java-patches
mailing list