This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Robot patchlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 26 Apr 2005 11:00:14 -0600
- Subject: Robot patchlet
- Reply-to: tromey at redhat dot com
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)
{