8058550: Clarify that TimerTasks are not reusable
authormartin
Thu, 18 Sep 2014 16:25:50 -0700
changeset 26715 5e166a2dc3ac
parent 26714 3caa40031b3f
child 26716 189794fe8ba2
8058550: Clarify that TimerTasks are not reusable Reviewed-by: alanb, chegar
jdk/src/java.base/share/classes/java/util/TimerTask.java
--- a/jdk/src/java.base/share/classes/java/util/TimerTask.java	Mon Sep 15 18:38:16 2014 -0700
+++ b/jdk/src/java.base/share/classes/java/util/TimerTask.java	Thu Sep 18 16:25:50 2014 -0700
@@ -26,10 +26,14 @@
 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
- * @see     Timer
  * @since   1.3
  */