< prev index next >
src/jdk.jpackage/share/classes/jdk/jpackage/internal/AddLauncherArguments.java
Print this page
*** 162,167 ****
--- 162,185 ----
String param, Map<?, ?> value) {
if (value != null && !value.isEmpty()) {
params.put(param, value);
}
}
+
+ static Map<String, ? super Object> merge(
+ Map<String, ? super Object> original,
+ Map<String, ? super Object> additional) {
+ Map<String, ? super Object> tmp = new HashMap<>(original);
+ if (additional.containsKey("module")) {
+ tmp.remove("main-jar");
+ tmp.remove("main-class");
+ } else if (additional.containsKey("main-jar")) {
+ tmp.remove("module");
+ // should we only remove add-modules when it wasn't actually passed
+ // but was inferred or empty ?
+ tmp.remove("add-modules");
+ }
+ tmp.putAll(additional);
+ return tmp;
+ }
+
}
< prev index next >