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

REGRESSION: java.beans.PropertyChangeSupport.add/remove/getPCL(s): unclear doc

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b41
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description



      Name: sdR10048 Date: 10/14/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b23"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] :
      api/java_beans/PropertyChangeSupport/descriptions.html#PropertySupport [PropertyChangeSupport0006]
      api/java_beans/PropertyChangeSupport/descriptions.html#PropertySupport12 [PropertyChangeSupport0015]

      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

      Parameters:
      listener - The PropertyChangeListener to be added

      ===

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

      Parameters:
      listener - The PropertyChangeListener to be removed

      ===

      public void addPropertyChangeListener(String propertyName,
                                            PropertyChangeListener listener)
      Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property.

      Parameters:
      propertyName - The name of the property to listen on.
      listener - The PropertyChangeListener to be added

      ===

      public void removePropertyChangeListener(String propertyName,
                                               PropertyChangeListener listener)
      Remove a PropertyChangeListener for a specific property.

      Parameters:
      propertyName - The name of the property that was listened on.
      listener - The PropertyChangeListener to be removed

      ===

      public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
      Returns an array of all the listeners which have been associated with the named property.

      Returns:
      all of the PropertyChangeListeners associated with the named property or an empty array if no listeners have been added

      ...
      ---------- end-of-excerpt ---------------

      Problem description
      ===================
      The doc for designated methods does not specify the expected behaviour
      in the following cases:

      1. addPropertyChangeListener(PropertyChangeListener listener)
         if listener == null;

      2. addPropertyChangeListener(PropertyChangeListener listener)
         if listener specified is already added;

      3. removePropertyChangeListener(PropertyChangeListener listener)
         if listener == null

      4. removePropertyChangeListener(PropertyChangeListener listener)
         if there is no such listener has been added

      5. addPropertyChangeListener(String propertyName,
                                            PropertyChangeListener listener)
         if propertyName == null;

      6. addPropertyChangeListener(String propertyName,
                                            PropertyChangeListener listener)
         if listener == null;

      7. addPropertyChangeListener(String propertyName,
                                            PropertyChangeListener listener)
         if the listener has been added already

      8. removePropertyChangeListener(String propertyName,
                                               PropertyChangeListener listener)
         if propertyName == null;

      9. removePropertyChangeListener(String propertyName,
                                               PropertyChangeListener listener)
         if listener == null;

      10. getPropertyChangeListeners(String propertyName)
          if listener == null;

      Please refer to the "Requirements for Writing Java API Specifications"
       (http://java.sun.com/j2se/javadoc/writingapispecs/index.html#method)
      for more information.

      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bchristi Brent Christian
              Reporter:
              dsvsunw Dsv Dsv (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: