Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900023

ProcessCommand may deadlock a waiting thread if IOE occurs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • jt5.0
    • None
    • 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! ]]

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

              Created:
              Updated:
              Resolved: