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

Some duplicated javac command-line options have repeated effect

    XMLWordPrintable

Details

    • CSR
    • Status: Closed
    • P5
    • Resolution: Approved
    • 18
    • tools
    • None
    • behavioral
    • minimal
    • It only reduces the output message and has little effect.
    • add/remove/modify command line option
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: