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

DescriptorSupport(String[],Object[]) doc contradictory concerning null parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-svc
    • None
    • b37
    • generic
    • generic

      The API documentation for the constructor javax.management.modelmbean.DescriptorSupport(String[],Object[]) says:
      "The array and array elements cannot be null."
      Then later it says:
      "@param fieldValues Object array of the corresponding field values. Elements of the array can be null."
      Finally it says:
      "Note: array sizes of parameters should match. If both arrays are null or empty, then an empty descriptor is created."

      The JCK requires implementations to throw an exception if either or both parameters are null. So the best fix to the documentation is to specify this. There are in any case easier ways to create an empty DescriptorSupport using the other constructors, in particular the no-arg constructor.
      ###@###.### 2005-03-16 17:50:29 GMT

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: