8214982: jpackage causes failures in existing HelpFlagsTest and VersionCheck tests JDK-8200758-branch
authorherrick
Fri, 07 Dec 2018 19:07:08 -0500
branchJDK-8200758-branch
changeset 57065 2446962c555c
parent 57064 a7fdadf67a92
child 57066 2fd0529702cd
8214982: jpackage causes failures in existing HelpFlagsTest and VersionCheck tests Reviewed-by: almatvee
src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
test/jdk/tools/jpackage/JPackageInvalidArgTest.java
test/jdk/tools/launcher/HelpFlagsTest.java
test/jdk/tools/launcher/VersionCheck.java
--- a/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Fri Dec 07 13:26:45 2018 -0500
+++ b/src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java	Fri Dec 07 19:07:08 2018 -0500
@@ -519,7 +519,7 @@
                     String filename = arg.substring(1);
                     argList.addAll(extractArgList(filename));
                 } else {
-                    Log.error("Illegal argument ["+arg+"]");
+                    Log.error("invalid option ["+arg+"]");
                 }
             } else {
                 argList.add(arg);
@@ -592,7 +592,7 @@
                     allOptions.add(option);
                     option.execute();
                 } else {
-                    Log.error("Illegal argument ["+arg+"]");
+                    Log.error("invalid option ["+arg+"]");
                 }
             }
 
--- a/test/jdk/tools/jpackage/JPackageInvalidArgTest.java	Fri Dec 07 13:26:45 2018 -0500
+++ b/test/jdk/tools/jpackage/JPackageInvalidArgTest.java	Fri Dec 07 19:07:08 2018 -0500
@@ -34,7 +34,7 @@
 
     private static final String ARG = "--no-such-argument";
     private static final String RESULT1 =
-            "Illegal argument [--no-such-argument]";
+            "invalid option [--no-such-argument]";
     private static final String RESULT2 = "ERROR: Mode is not specified";
 
     private static void validate(String output) throws Exception {
--- a/test/jdk/tools/launcher/HelpFlagsTest.java	Fri Dec 07 13:26:45 2018 -0500
+++ b/test/jdk/tools/launcher/HelpFlagsTest.java	Fri Dec 07 19:07:08 2018 -0500
@@ -156,13 +156,12 @@
         new ToolHelpSpec("jstatd",      1,   1,   1,   0,         0,    0,     1),     // -?, -h, --help
         new ToolHelpSpec("keytool",     1,   1,   1,   0,         1,    0,     1),     // none, prints help message anyways.
         new ToolHelpSpec("pack200",     1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
-        new ToolHelpSpec("rmic",        0,   0,   0,   0,         0,    0,     1),     // none, pirnts help message anyways.
+        new ToolHelpSpec("rmic",        0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
         new ToolHelpSpec("rmid",        0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
         new ToolHelpSpec("rmiregistry", 0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
         new ToolHelpSpec("serialver",   0,   0,   0,   0,         0,    0,     1),     // none, prints help message anyways.
         new ToolHelpSpec("unpack200",   1,   1,   1,   0,         1,    0,     2),     // -?, -h, --help, -help accepted but not documented.
-        // Oracle proprietary tools:
-        new ToolHelpSpec("javapackager",0,   0,   0,   0,         1,    0,   255),     // -help accepted but not documented.
+        new ToolHelpSpec("jpackage",    0,   1,   1,   0,         0,    0,   255),     //     -h, --help,
     };
 
     // Returns true if the file is not a tool.
--- a/test/jdk/tools/launcher/VersionCheck.java	Fri Dec 07 13:26:45 2018 -0500
+++ b/test/jdk/tools/launcher/VersionCheck.java	Fri Dec 07 19:07:08 2018 -0500
@@ -62,7 +62,7 @@
         "jmc",
         "jmc.ini",
         "jweblauncher",
-        "packager",
+        "jpackage",
         "ssvagent",
         "unpack200",
     };
@@ -108,7 +108,7 @@
         "klist",
         "ktab",
         "pack200",
-        "packager",
+        "jpackage",
         "rmic",
         "rmid",
         "rmiregistry",