swingworker
  1. swingworker
  2. SWINGWORKER-5

SwingWorker does not change the state to DONE

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      5

      Description

      Hi Igor,

      when a RuntimeException occurs in the #done() method of a worker, the state of
      this worker does not change to DONE. Sometimes in applications it is needed to
      proceed the execution of the application regardless of such exceptions, e.g. you
      may want to clean up resources allocated by a worker. In the current
      implementation of the SwingWorker the bound property "state" is never changed to
      DONE in such situations, even though the worker has been finished due to an
      exception. And hence we are not able to clean up resources. I hope you will
      accept my patch and integrate it into the JDK.

      Best regards,
      Andrej Golovnin

      1. Issue_5.patch
        2 kB
        golovnin
      2. Issue_5.patch
        1 kB
        golovnin
      3. patch
        4 kB
        idk

        Activity

        Hide
        golovnin added a comment -

        Created an attachment (id=1)
        Patch for this issue.

        Show
        golovnin added a comment - Created an attachment (id=1) Patch for this issue.
        Hide
        golovnin added a comment -

        Created an attachment (id=3)
        Improved fix for this issue. Fixes also some typos.

        Show
        golovnin added a comment - Created an attachment (id=3) Improved fix for this issue. Fixes also some typos.
        Hide
        idk added a comment -

        assigning to idk@dev.java.net

        Show
        idk added a comment - assigning to idk@dev.java.net
        Hide
        idk added a comment -

        bug entry in sun's bugdatabase:
        6557137 [SwingWorker does not change the state to DONE on exception in done]
        http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6557137

        Show
        idk added a comment - bug entry in sun's bugdatabase: 6557137 [SwingWorker does not change the state to DONE on exception in done] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6557137
        Hide
        golovnin added a comment -

        Hi Igor,

        any plans, when this issue will be fixed?

        • Andrej
        Show
        golovnin added a comment - Hi Igor, any plans, when this issue will be fixed? Andrej
        Hide
        idk added a comment -

        Created an attachment (id=4)
        version of the fix for 7.0

        Show
        idk added a comment - Created an attachment (id=4) version of the fix for 7.0
        Hide
        idk added a comment -

        Hi Andrej,

        I will backport a fix from 7.0 (see
        https://swingworker.dev.java.net/nonav/issues/showattachment.cgi/4/patch ) in a
        nearest future. After a few other fixes are backported a new release for
        swingworker will be published.

        Thanks,
        Igor

        Show
        idk added a comment - Hi Andrej, I will backport a fix from 7.0 (see https://swingworker.dev.java.net/nonav/issues/showattachment.cgi/4/patch ) in a nearest future. After a few other fixes are backported a new release for swingworker will be published. Thanks, Igor
        Hide
        golovnin added a comment -

        Hi Igor,

        I know you are busy on the JavaFX.
        But what are the plans to fix this issue?

        • Andrej
        Show
        golovnin added a comment - Hi Igor, I know you are busy on the JavaFX. But what are the plans to fix this issue? Andrej
        Hide
        idk added a comment -

        Hi Andrej,

        thank you for the reminder. I just checked in a fix for this bug and will roll
        out a new swingworker binaries in a few minutes.

        Show
        idk added a comment - Hi Andrej, thank you for the reminder. I just checked in a fix for this bug and will roll out a new swingworker binaries in a few minutes.

          People

          • Assignee:
            idk
            Reporter:
            golovnin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: