classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Closing swing timer bug 23918


From: Meskauskas Audrius
Subject: [cp-patches] FYI: Closing swing timer bug 23918
Date: Fri, 16 Sep 2005 20:42:47 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

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

2005-09-16    Audrius Meskauskas  <address@hidden>

* 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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]