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

java.util.Observable.notifyObservers() locks object's monitor for duration

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0.k
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description

      The routine java.util.Observable.notifyObservers() is synchronized, so it gains ownership of the object's monitor. It keeps this lock through the duration of the notification, which means in all the observers' update routines. This is not right; it makes things deadlock for no good reason. There's no reason to keep ownership of the monitor.

        Attachments

          Activity

            People

            • Assignee:
              djbrown David Brown (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: