Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8058550

Clarify that TimerTasks are not reusable

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Resolved In Build:
      b33
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        To the javadoc of java.util.TimerTask please add something like:
        A TimerTask instance is not re-usable i.e.: never use it twice for Timer.schedule(...).

        Additionally you could extend the exception description of j.u.Timer.schedule(...):
        IllegalStateException - if task was already scheduled, canceled or already done, timer was canceled, or timer thread terminated.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                martin Martin Buchholz
                Reporter:
                ulfzibis Ulf Zibis
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: