This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
Patch: DnDTest fix
- From: Lillian Angel <langel at redhat dot com>
- To: mauve-patches <mauve-patches at sources dot redhat dot com>
- Date: Tue, 15 Aug 2006 11:39:19 -0400
- Subject: Patch: DnDTest fix
Another small fix
2006-08-13 Lillian Angel <langel@redhat.com>
* gnu/testlet/java/awt/dnd/DnDTest.java:
(MouseThread.run): Reformatted and set unsuccessful
field to true in catch-block.
Index: gnu/testlet/java/awt/dnd/DnDTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/dnd/DnDTest.java,v
retrieving revision 1.3
diff -u -r1.3 DnDTest.java
--- gnu/testlet/java/awt/dnd/DnDTest.java 14 Aug 2006 17:56:22 -0000 1.3
+++ gnu/testlet/java/awt/dnd/DnDTest.java 15 Aug 2006 15:36:43 -0000
@@ -160,39 +160,45 @@
r.mouseRelease(InputEvent.BUTTON1_MASK);
}
- class MouseThread extends Thread
+ class MouseThread
+ extends Thread
{
- public boolean shouldStop;
- public void run()
- {
- try
- {
- shouldStop=false;
- Robot robot=new Robot();
+ public boolean shouldStop;
- for(;;)
- {
-
- for(int i=start;i<end;i++)
- {
- if(shouldStop)break;
- robot.mouseMove(150,i);
- yield();
- }
- for(int i=end;i>start;i--)
- {
- if(shouldStop)break;
- robot.mouseMove(150,i);
- yield();
- }
- if(shouldStop)break;
- }
- }
- catch(Exception e)
- {
- System.out.println(e);
- }
- }
+ public void run()
+ {
+ try
+ {
+ shouldStop = false;
+ Robot robot = new Robot();
+
+ for (;;)
+ {
+ for (int i = start; i < end; i++)
+ {
+ if (shouldStop)
+ break;
+
+ robot.mouseMove(150, i);
+ yield();
+ }
+ for (int i = end; i > start; i--)
+ {
+ if (shouldStop)
+ break;
+
+ robot.mouseMove(150, i);
+ yield();
+ }
+ if (shouldStop)
+ break;
+ }
+ }
+ catch (Exception e)
+ {
+ unsuccessful = true;
+ }
+ }
}
public void actionPerformed(ActionEvent e)