8058550: Clarify that TimerTasks are not reusable

Reviewed-by: alanb, chegar
This commit is contained in:
Martin Buchholz 2014-09-18 16:25:50 -07:00
parent f1cc7f5119
commit 865fe20405

View file

@ -26,10 +26,14 @@
package java.util; package java.util;
/** /**
* A task that can be scheduled for one-time or repeated execution by a Timer. * A task that can be scheduled for one-time or repeated execution by a
* {@link Timer}.
*
* <p>A timer task is <em>not</em> reusable. Once a task has been scheduled
* for execution on a {@code Timer} or cancelled, subsequent attempts to
* schedule it for execution will throw {@code IllegalStateException}.
* *
* @author Josh Bloch * @author Josh Bloch
* @see Timer
* @since 1.3 * @since 1.3
*/ */