diff options
author | Mark Wielaard <mark@klomp.org> | 2005-11-02 21:30:39 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2005-11-02 21:30:39 +0000 |
commit | ed9904950924f0336e05bb705e2d7b572cfddd70 (patch) | |
tree | bbb9823ebf9a0e86122c70991d1eba19e7b3d6cf /javax/swing/Timer.java | |
parent | e9d3d502a36b8f9f469c7ef96be4c23528a91d09 (diff) | |
download | classpath-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.java | 15 |
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; |