summaryrefslogtreecommitdiff
path: root/javax/swing/Timer.java
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2005-11-02 21:30:39 +0000
committerMark Wielaard <mark@klomp.org>2005-11-02 21:30:39 +0000
commited9904950924f0336e05bb705e2d7b572cfddd70 (patch)
treebbb9823ebf9a0e86122c70991d1eba19e7b3d6cf /javax/swing/Timer.java
parente9d3d502a36b8f9f469c7ef96be4c23528a91d09 (diff)
downloadclasspath-ed9904950924f0336e05bb705e2d7b572cfddd70.tar.gz
* javax/swing/Timer.java (Waker.run): Only break out when !running.
Diffstat (limited to 'javax/swing/Timer.java')
-rw-r--r--javax/swing/Timer.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/javax/swing/Timer.java b/javax/swing/Timer.java
index e38915dc3..b55465db5 100644
--- a/javax/swing/Timer.java
+++ b/javax/swing/Timer.java
@@ -68,7 +68,15 @@ public class Timer
running = true;
try
{
- sleep(initialDelay);
+ try
+ {
+ sleep(initialDelay);
+ }
+ catch (InterruptedException e)
+ {
+ if (!running)
+ return;
+ }
queueEvent();
@@ -81,7 +89,8 @@ public class Timer
}
catch (InterruptedException e)
{
- return;
+ if (!running)
+ break;
}
queueEvent();
@@ -93,7 +102,7 @@ public class Timer
}
running = false;
}
- catch (Exception e)
+ finally
{
// The timer is no longer running.
running = false;