ProcessCommand may deadlock a waiting thread if IOE occurs

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • jt5.0
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b19
    • generic
    • generic
    • Verified

      From Jon...
      Look at method StreamCopier.run(). At the end of it is a synchronized block to set the "done" flag true and notifyAll(). Almost certainly, this should be in a finally block, to guarantee it gets executed. As it is now, a runtime exception or error could cause the method to exit early, and fail to set the "done" flag, thereby leaving any client of "waitUntilDone" hanging.

      [[ Note, the formatting of this method sucks! This is probably my fault from many years ago. These days, avoid tabs. Use "expand" to replace them and NB to reformat code! ]]

            Assignee:
            Brian Kurotsuchi (Inactive)
            Reporter:
            Brian Kurotsuchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: