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

REGRESSION: beancontext.BeanContextChildSupport.add/remove PCL/VCL: 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/beancontext/BeanContextChildSupport/index.html#add [BeanContextChildSupport0003]


      Specification excerpt:
      ======================
      --------- J2SE API spec v.1.5 ---------
      ...
      public void addPropertyChangeListener(String name,
                                            PropertyChangeListener pcl)
      Adds a property change listener.

      Specified by:
      addPropertyChangeListener in interface BeanContextChild
      Parameters:
      name - The name of the property to listen on
      pcl - The PropertyChangeListener to be added

      ===

      public void removePropertyChangeListener(String name,
                                               PropertyChangeListener pcl)
      Remove a property change listener.

      Specified by:
      removePropertyChangeListener in interface BeanContextChild
      Parameters:
      name - The name of the property that was listened on
      pcl - The PropertyChangeListener to be removed

      ===

      public void addVetoableChangeListener(String name,
                                            VetoableChangeListener vcl)
      Adds a VetoableChangeListener.

      Specified by:
      addVetoableChangeListener in interface BeanContextChild
      Parameters:
      name - The name of the property to listen on
      vcl - The VetoableChangeListener to be added

      ===

      public void removeVetoableChangeListener(String name,
                                               VetoableChangeListener vcl)
      Removes a VetoableChangeListener.

      Specified by:
      removeVetoableChangeListener in interface BeanContextChild
      Parameters:
      name - The name of the property that was listened on
      vcl - The VetoableChangeListener to be removed

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

      Problem description
      ===================
      The spec for the designated 4 methods does not say about the
      expected behaviour in cases:

      1. addPropertyChangeListener(String name,
                                            PropertyChangeListener pcl)
         if name == null;

      2. addPropertyChangeListener(String name,
                                            PropertyChangeListener pcl)
         if pcl == null;

      3. addPropertyChangeListener(String name,
                                            PropertyChangeListener pcl)
        if pcl has already been added;

      4. public void removePropertyChangeListener(String name,
                                               PropertyChangeListener pcl)
        if name == null;

      5. public void removePropertyChangeListener(String name,
                                               PropertyChangeListener pcl)
        if pcl == null;

      6. public void removePropertyChangeListener(String name,
                                               PropertyChangeListener pcl)
        if there is no such listener as pcl;

      7. public void removePropertyChangeListener(String name,
                                               PropertyChangeListener pcl)
        if pcl has been added regarding another property name;

      8. The same 7 points about add/removeVetoableChangeListener methods

      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: