changeset 732:5b5d965900b8

6990390: javah -help produces help screen with extraneous output Reviewed-by: darcy
author jjg
date Mon, 11 Oct 2010 10:19:57 -0700
parents c8b4a1e76089
children 68cf07910d74
files src/share/classes/com/sun/tools/javah/resources/l10n.properties test/tools/javah/TestHelpOpts.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Thu Oct 07 15:26:32 2010 -0700
+++ b/src/share/classes/com/sun/tools/javah/resources/l10n.properties	Mon Oct 11 10:19:57 2010 -0700
@@ -94,7 +94,7 @@
 \  -d <dir>                 Output directory
 main.opt.v=\
 \  -v  -verbose             Enable verbose output
-main.opt.help=\
+main.opt.h=\
 \  -h  --help  -?           Print this message
 main.opt.version=\
 \  -version                 Print version information
--- a/test/tools/javah/TestHelpOpts.java	Thu Oct 07 15:26:32 2010 -0700
+++ b/test/tools/javah/TestHelpOpts.java	Mon Oct 11 10:19:57 2010 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6893932
+ * @bug 6893932 6990390
  * @summary javah help screen lists -h and -? but does not accept them
  */
 
@@ -68,6 +68,8 @@
         String flat = out.replaceAll("\\s+", " "); // canonicalize whitespace
         if (!flat.contains("Usage: javah [options] <classes> where [options] include:"))
             error("expected text not found");
+        if (flat.contains("main.opt"))
+            error("key not found in resource bundle: " + flat.replaceAll(".*(main.opt.[^ ]*).*", "$1"));
     }
 
     void error(String msg) {