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

The description of field "originalType" in MXBean javadoc is inconsistent with Descriptor's spec

    Details

    • Subcomponent:
    • Resolved In Build:
      b81
    • CPU:
      generic
    • OS:
      generic

      Description

      "MBeanInfo contents for an MXBean" section in MXBean specification has the following sentence:
      --
      The Descriptor for each of these objects will also have a field originalType that is a
      string representing the Java type that appeared in the MXBean interface. *For a generic
      Java type, this is the string returned by toString()*. For a class or primitive type, this
      is the string returned by Class.getName().
      --
        About "For a generic Java type, this is the string returned by toString()"...
        The javadoc for javax.management.Descriptor says:

      --
      originalType:
      For a non-generic type, the string value is the value returned by Class.getName(). For a
      parameterized type such as Map<String,Integer> it is *a string representation of the type,
      with the raw type followed by the actual type arguments in angle brackets separated by
      commas without spaces*, for example "java.util.Map<java.lang.String,java.lang.Integer>".
      --

        Consider the type: List<String>
        The originalType: "java.util.List<java.lang.String>"
        - and this won't be returned by var.getClass().toString()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emcmanus Eamonn McManus
                Reporter:
                ashusher Alexander Shusherov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: