This closes 23918. I also add new Mauve test for this case..

2005-09-16    Audrius Meskauskas  <[EMAIL PROTECTED]>

* javax.swing.Timer.java (Waker.run): Do not enter loop on repeats = false.
Index: javax/swing/Timer.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/Timer.java,v
retrieving revision 1.20
diff -u -r1.20 Timer.java
--- javax/swing/Timer.java      2 Jul 2005 20:32:49 -0000       1.20
+++ javax/swing/Timer.java      16 Sep 2005 18:37:28 -0000
@@ -72,24 +72,25 @@
 
           queueEvent();
 
-          while (running)
-            {
-              try
-                {
-                  sleep(delay);
-                }
-              catch (InterruptedException e)
-                {
-                  return;
-                }
-              queueEvent();
+          if (repeats)
+            while (running)
+              {
+                try
+                  {
+                    sleep(delay);
+                  }
+                catch (InterruptedException e)
+                  {
+                    return;
+                  }
+                queueEvent();
 
-              if (logTimers)
-                System.out.println("javax.swing.Timer -> clocktick");
+                if (logTimers)
+                  System.out.println("javax.swing.Timer -> clocktick");
 
-              if ( ! repeats)
-                break;
-            }
+                if ( ! repeats)
+                  break;
+              }
           running = false;
         }
       catch (Exception e)
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to