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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 19
    • None
    • hotspot
    • svc
    • b03

      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)

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

              Created:
              Updated:
              Resolved: