< prev index next >

src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/AddLauncherArguments.java

Print this page

        

@@ -27,10 +27,11 @@
 
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.io.File;
+import java.util.List;
 import jdk.incubator.jpackage.internal.Arguments.CLIOptions;
 
 /*
  * AddLauncherArguments
  *

@@ -158,12 +159,14 @@
         }
     }
 
     static Map<String, ? super Object> merge(
             Map<String, ? super Object> original,
-            Map<String, ? super Object> additional) {
+            Map<String, ? super Object> additional, String... exclude) {
         Map<String, ? super Object> tmp = new HashMap<>(original);
+        List.of(exclude).forEach(tmp::remove);
+
         if (additional.containsKey(CLIOptions.MODULE.getId())) {
             tmp.remove(CLIOptions.MAIN_JAR.getId());
             tmp.remove(CLIOptions.APPCLASS.getId());
         } else if (additional.containsKey(CLIOptions.MAIN_JAR.getId())) {
             tmp.remove(CLIOptions.MODULE.getId());
< prev index next >