8315383: jlink SystemModulesPlugin incorrectly parses the options

Reviewed-by: mchung
This commit is contained in:
Oliver Kopp 2023-08-31 16:10:44 +00:00 committed by Mandy Chung
parent 29ff1e45b9
commit ea5aa61c8c
2 changed files with 2 additions and 6 deletions

View File

@ -148,7 +148,7 @@ public final class SystemModulesPlugin extends AbstractPlugin {
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]);

View File

@ -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;
@ -94,7 +90,7 @@ public class JLinkDedupTestBatchSizeOne {
.addMods("m2")
.addMods("m3")
.addMods("m4")
.option("--system-modules=batchSize=1")
.option("--system-modules=batch-size=1")
.call()
.assertSuccess();