Skip to content

Commit 1c1b554

Browse files
AdditionalLauncher.java: Fix AdditionalLauncher.PropertyFile to handle property expressions without "=".
1 parent 3b848a3 commit 1c1b554

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,13 @@ public static final class PropertyFile {
393393
PropertyFile(Path path) throws IOException {
394394
data = Files.readAllLines(path).stream().map(str -> {
395395
return str.split("=", 2);
396-
}).collect(toMap(tokens -> tokens[0], tokens -> tokens[1], (oldValue, newValue) -> {
396+
}).collect(toMap(tokens -> tokens[0], tokens -> {
397+
if (tokens.length == 1) {
398+
return "";
399+
} else {
400+
return tokens[1];
401+
}
402+
}, (oldValue, newValue) -> {
397403
return newValue;
398404
}));
399405
}

0 commit comments

Comments
 (0)