Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-136

[lang] Make StopWatch validate state transitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1
    • None
    • None
    • Operating System: other
      Platform: Other

    • 29163

    Description

      Per Henri's email to commons-dev on 5/23/2004, StopWatch currently let's you
      call split() or stop() multiple times. StopWatch could benefit from some
      validation, to make sure the following validation occurs:

      1. split(), suspend(), or stop() cannot be invoked twice.
      2. unsplit() may only be called if the watch has been split()
      3. resume() may only be called if the watch has been suspend()
      4. start() cannot be called twice.

      Whomever takes on this burden should take some time to draw a simple state
      transition diagram and put it in the JavaDoc.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tobrien@discursive.com Tim O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: