Skip to content

Commit

Permalink
8315383: jlink SystemModulesPlugin incorrectly parses the options
Browse files Browse the repository at this point in the history
Reviewed-by: mchung
  • Loading branch information
koppor authored and Mandy Chung committed Aug 31, 2023
1 parent 29ff1e4 commit ea5aa61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
6 changes: 1 addition & 5 deletions test/jdk/tools/jlink/JLinkDedupTestBatchSizeOne.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@
* questions.
*/

import jdk.test.lib.JDKToolLauncher;
import jdk.test.lib.compiler.CompilerUtils;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import tests.JImageGenerator;
import tests.Result;

import java.io.File;
import java.nio.file.Files;
Expand Down Expand Up @@ -94,7 +90,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();

Expand Down

1 comment on commit ea5aa61

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.