8208579: [jpackager] --secondary-launcher arg fails when properties file has no icon JDK-8200758-branch
authorherrick
Thu, 02 Aug 2018 17:42:35 -0400
branchJDK-8200758-branch
changeset 56849 16c34c7b4147
parent 56848 f8a7c83f31f1
child 56850 678d72c01ee6
8208579: [jpackager] --secondary-launcher arg fails when properties file has no icon Reviewed-by: almatvee
src/jdk.packager/share/classes/jdk/packager/internal/SecondaryLauncherArguments.java
--- a/src/jdk.packager/share/classes/jdk/packager/internal/SecondaryLauncherArguments.java	Thu Aug 02 17:40:34 2018 -0400
+++ b/src/jdk.packager/share/classes/jdk/packager/internal/SecondaryLauncherArguments.java	Thu Aug 02 17:42:35 2018 -0400
@@ -76,8 +76,9 @@
         putUnlessNull(bundleParams, Arguments.CLIOptions.SINGLETON.getId(),
             getOptionValue(CLIOptions.SINGLETON));
 
+        String value = getOptionValue(CLIOptions.ICON);
         putUnlessNull(bundleParams, Arguments.CLIOptions.ICON.getId(),
-                    new File(getOptionValue(CLIOptions.ICON)));
+                    (value == null) ? null : new File(value));
         
         String argumentStr = getOptionValue(CLIOptions.ARGUMENTS);
         putUnlessNullOrEmpty(bundleParams,