changeset 16604:8613f82fab04

8173717: jlink --help fails with missing "plugin.opt.plugin-module-path" key in resource bundle Reviewed-by: mchung, alanb
author sundar
date Wed, 01 Feb 2017 15:12:03 +0530
parents 7bd7a7ffa84b
children c5a48effbe68
files src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties test/tools/jlink/JLinkTest.java
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java	Tue Jan 31 20:06:32 2017 -0800
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java	Wed Feb 01 15:12:03 2017 +0530
@@ -227,12 +227,6 @@
                     addOrderedPluginOptions(plugin, optionsSeen);
                 }
             }
-            mainOptions.add(new PluginOption(false,
-                    (task, opt, arg) -> {
-                        // This option is handled prior
-                        // to have the options parsed.
-                    },
-                    false, "--plugin-module-path"));
             mainOptions.add(new PluginOption(true, (task, opt, arg) -> {
                     for (Plugin plugin : plugins) {
                         if (plugin.getName().equals(arg)) {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties	Tue Jan 31 20:06:32 2017 -0800
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties	Wed Feb 01 15:12:03 2017 +0530
@@ -28,7 +28,7 @@
 \<path> use --help for a list of possible options
 
 main.usage=\
-Usage: {0} <options> --module-path <modulepath> --add-modules <mods> --output
+Usage: {0} <options> --module-path <modulepath> --add-modules <mods> --output\n\
 \<path> Possible options include:
 
 error.prefix=Error:
--- a/test/tools/jlink/JLinkTest.java	Tue Jan 31 20:06:32 2017 -0800
+++ b/test/tools/jlink/JLinkTest.java	Wed Feb 01 15:12:03 2017 +0530
@@ -284,6 +284,13 @@
             helper.generateDefaultJModule(moduleName, "composite2");
             helper.generateDefaultImage(userOptions, moduleName).assertFailure("Error: orphan argument: bar");
         }
+
+        // basic check for --help - JDK-8173717
+        {
+            JImageGenerator.getJLinkTask()
+                    .option("--help")
+                    .call().assertSuccess();
+        }
     }
 
     private static void testCompress(Helper helper, String moduleName, String... userOptions) throws IOException {