<Swing Dev> [9] Review Request for 8130735: javax.swing.TimerQueue: timer fires late when another timer starts

Semyon Sadetsky semyon.sadetsky at oracle.com
Thu Jul 9 17:08:28 UTC 2015


Hello,

Please review fix for JDK9:

bug: https://bugs.openjdk.java.net/browse/JDK-8130735
webrev: http://cr.openjdk.java.net/~ssadetsky/8130735/webrev.00/

The root cause is the setting larger expiration time for the timer which 
is already inserted into the delay queue. So all timers behind the timer 
cannot be executed earlier than its expiration time. This happens very 
rare only for repeated timers and only if user uses the Swing timer API 
inaccurately (call start() without stop()).
The fix eliminates this possibility by introducing a check if the timer 
was already restarted concurrently.
It is difficult to write test because I could not reliably reproduce the 
issue for a reasonable time.

--Semyon



More information about the swing-dev mailing list