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

VM.class_hierarchy jcmd help output and man page text needs clarifications/improvements

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 19
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc
    • Resolved In Build:
      b03

      Description

      The man page output for the VM.class_hierarchy jcmd is incorrect w.r.t. the -s option. It says:

      -s: (Optional) If a class name is specified, it prints the subclasses. If the class name
      is not specified, only the superclasses are printed. (BOOLEAN, false)

      This is incorrect. The second sentence should say something along the lines of "If the -s option is not specified..."

      The jcmd help output is a bit better, but also a bit ambiguous:

      -s : [optional] If a classname is specified, print its subclasses. Otherwise only its
      superclasses are printed. (BOOLEAN, false)

      "Otherwise" could interpreted as "if a classname is NOT specified", but the intended meaning is "If the -s option is not specified". I think the wording for each should be changed to:

      -s: [optional] If a classname is specified print its subclasses in addition to its superclasses. Without this option only the superclasses will be printed. (BOOLEAN, false)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cjplummer Chris Plummer
              Reporter:
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: