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

Inconsistent behavior of --validate-modules when combined with -m and other options

    XMLWordPrintable

Details

    • b20
    • Verified

    Backports

      Description

        --list-modules, --validate-modules and --describe-module options are terminal options. It exits after it does its job and prints the result.

        java --list-modules -m abc
           - This uses the specified initial module as the root for the module resolution.

        java --validate-modules -m abc
           --validate-modules ignores -m and any modules specified via --add-modules. It only resolves all system modules.

        Other launcher terminal options include -version, -jar, and --module.

        java -version -m abc
           - all arguments following -version is ignored.

        java --validate-modules --list-modules
        java --list-modules --validate-modules
           the current behavior accepts both terminal options but always list modules and exit. I think we should reject when both options are specified. Similarly, -m can't be combined with these options and maybe when any argument following --list-modules, --validate-module, --describe-module <module-name> is specified.

        Attachments

          Issue Links

            Activity

              People

                alanb Alan Bateman
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: