changeset 10694:419e730c34da

8058550: Clarify that TimerTasks are not reusable Reviewed-by: alanb, chegar
author martin
date Thu, 18 Sep 2014 16:25:50 -0700
parents 2c479a3aa7be
children 7aca109497bf
files src/java.base/share/classes/java/util/TimerTask.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/TimerTask.java	Mon Sep 15 18:38:16 2014 -0700
+++ b/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
  */