8173717: jlink --help fails with missing "plugin.opt.plugin-module-path" key in resource bundle
authorsundar
Wed, 01 Feb 2017 15:12:03 +0530
changeset 43495 8255aabd0e09
parent 43494 11801b2ff456
child 43496 fbafb9f36e96
8173717: jlink --help fails with missing "plugin.opt.plugin-module-path" key in resource bundle Reviewed-by: mchung, alanb
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties
jdk/test/tools/jlink/JLinkTest.java
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/TaskHelper.java	Tue Jan 31 20:06:32 2017 -0800
+++ b/jdk/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/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties	Tue Jan 31 20:06:32 2017 -0800
+++ b/jdk/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/jdk/test/tools/jlink/JLinkTest.java	Tue Jan 31 20:06:32 2017 -0800
+++ b/jdk/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 {