|
Description
|
Passing a very large delay, e.g. Long.MAX_VALUE, as a parameter to one of the four schedule(AtFixedRate) methods can cause the task to be executed again and again, when clearly this is not the intention.
For Example:
timer.scheduleAtFixedRate(t, 0L, Long.MAX_VALUE);
causes the task, t, to be executed over and over again.
A period of Long.MAX_VALUE should cause a periodic task to "never" execute twice.
Posted Date : 2008-07-28 15:19:46.0
|