src/jdk.jpackage/share/classes/jdk/jpackage/internal/AddLauncherArguments.java
branchJDK-8200758-branch
changeset 57259 a84c657c713d
parent 57256 d7c27451f759
child 57291 f2d429260ad4
equal deleted inserted replaced
57258:ea75e8d7e34f 57259:a84c657c713d
   162             String param, Map<?, ?> value) {
   162             String param, Map<?, ?> value) {
   163         if (value != null && !value.isEmpty()) {
   163         if (value != null && !value.isEmpty()) {
   164             params.put(param, value);
   164             params.put(param, value);
   165         }
   165         }
   166     }
   166     }
       
   167 
       
   168     static Map<String, ? super Object> merge(
       
   169             Map<String, ? super Object> original,
       
   170             Map<String, ? super Object> additional) {
       
   171         Map<String, ? super Object> tmp = new HashMap<>(original);
       
   172         if (additional.containsKey("module")) {
       
   173             tmp.remove("main-jar");
       
   174             tmp.remove("main-class");
       
   175         } else if (additional.containsKey("main-jar")) {
       
   176             tmp.remove("module");
       
   177             // should we only remove add-modules when it wasn't actually passed
       
   178             // but was inferred or empty ?
       
   179             tmp.remove("add-modules");
       
   180         }
       
   181         tmp.putAll(additional);
       
   182         return tmp;
       
   183     }
       
   184 
   167 }
   185 }