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

Some duplicated javac command-line options have repeated effect

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P5
    • Resolution: Approved
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      It only reduces the output message and has little effect.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Reduce the repeated output messages when using the duplicated compiler command line options (--version, --help, --help-extra, --help-lint, --full-version).

      Problem

      Currently, when using the duplicated info options listed above, the compiler will output the same message multi times. It is unnecessary and not easy to read. Please see the following example. The message javac 17-internal appears unnecessarily multiple times.

      $ javac -version -version
      javac 17-internal
      javac 17-internal

      And the more messages are output, the harder it is to read. Please use the following commands to see the more complicated output messages which are hard to read.

      javac --full-version --full-version
      javac --help --help
      javac --help-extra --help-extra
      javac --help-lint --help-lint

      Solution

      The compiler should only output the message once when using the duplicated info options listed above.

      Specification

      During the option handling, when the info options listed above appear multi times, the compiler should ignore them instead of processing them. In other words, the compiler should operate like the following example.

      $ javac -version -version
      javac 17-internal

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gli Guoxiong Li
              Reporter:
              prappo Pavel Rappo
              Reviewed By:
              Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: