-
Bug
-
Resolution: Fixed
-
P3
-
21.0.1, 22
-
b14
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8315703 | 21.0.2 | Mandy Chung | P3 | Resolved | Fixed | b02 |
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();
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();
- backported by
-
JDK-8315703 jlink SystemModulesPlugin incorrectly parses the options
- Resolved
- relates to
-
JDK-8240567 MethodTooLargeException thrown while creating a jlink image
- Resolved
- links to
-
Commit openjdk/jdk21u/b207ce77
-
Commit openjdk/jdk/ea5aa61c
-
Review openjdk/jdk21u/126
-
Review openjdk/jdk21u/127
-
Review openjdk/jdk/15495
(2 links to)