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

jlink SystemModulesPlugin incorrectly parses the options

    XMLWordPrintable

Details

    • b14

    Backports

      Description

        A bug in the jlink SystemModulesPlugin in parsing the "batch-size" option

        diff --git a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
        b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
        index 77ba8c063e8..ff55f812d91 100644
        --- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
        +++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
        @@ -148,7 +148,7 @@ public void configure(Map<String, String> config) {
                     if (split.length != 2) {
                         throw new IllegalArgumentException(getName() + ": " + arg);
                     }
        - if (split[0].equals("batch-size")) {
        + if (!split[0].equals("batch-size")) {
                         throw new IllegalArgumentException(getName() + ": " + arg);
                     }
                     this.moduleDescriptorsPerMethod = Integer.parseInt(split[1]);
        diff --git a/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
        b/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
        index a8c8010ab3e..11a9e40b5b3 100644
        --- a/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
        +++ b/test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
        @@ -94,7 +94,7 @@ public static void main(String[] args) throws Throwable {
                         .addMods("m2")
                         .addMods("m3")
                         .addMods("m4")
        - .option("--system-modules=batchSize=1")
        + .option("--system-modules=batch-size=1")
                         .call()
                         .assertSuccess();

        Attachments

          Issue Links

            Activity

              People

                mchung Mandy Chung
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: