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

PropertyDescriptor(String, Class, String, String) works wrong if getter is null

    XMLWordPrintable

Details

    • sparc
    • solaris_2.5

    Description



      Name: dsC58869 Date: 07/10/99



      This bug was introduced in JDK1.3-K release.

      The java.beans.PropertyDescriptor(String propertyName, Class beanClass,
      String getterName, String setterName) construstor throws
      unexpected NullPointerException if getterName is null.

      Doc say:
      This constructor takes the name of a simple property, and method names for reading and writing the property.
             Parameters:
                    propertyName - The programmatic name of the property.
                    beanClass - The Class object for the target bean. For example sun.beans.OurButton.class.
                    getterName - The name of the method used for reading the property value.
                                 May be null if the property is write-only.
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    setterName - The name of the method used for writing the property value. May be null if the property is read-only.
             Throws:
                    IntrospectionException - if an exception occurs during introspection.

      Please see example in JCK-1.2.2:
      api/java_beans/PropertyDescriptor/descriptions.html#Ctor2,
      test case PropertyDescriptor0005.

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

      Attachments

        Activity

          People

            jkoenigsunw Janet Koenig (Inactive)
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: