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

SwingPropertyChangeSupport broken!

XMLWordPrintable

    • ladybird
    • generic
    • generic



        Name: dbT83986 Date: 12/31/98


        1) Add more than one PropertyChangeListener to any
        subclass of JComponent that uses
        SwingPropertyChangeSupport (using
        addPropertyChangeListener())

        2) In the propertyChange() method of the class that
        implements PropertyChangeListener, remove a
        a listener from the JComponent (using
        removePropertyChangeListener())

        ==> Concurrent modification problem -- if a listener
        is removed whilst the listeners are being sent messages,
        then some listeners will be skipped: the implementation
        of SwingPropertyChangeSupport does not synchronize its
        vector of listeners (according to the comment, this is
        because Swing is single-threaded). Concurrent modification
        can occur even in a single-threaded environment!

        This bug is a show-stopper for our application!
        (and I can find no workaround)
        (Review ID: 42013)
        ======================================================================

              mdavidsosunw Mark Davidson (Inactive)
              dblairsunw Dave Blair (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: