8175047: javadoc should support --help-extra as a synonym for -X
authorjjg
Wed, 15 Feb 2017 18:30:31 -0800
changeset 43875 d0e60aa1f18b
parent 43874 d49715456f51
child 43876 bfb874896f7e
8175047: javadoc should support --help-extra as a synonym for -X Reviewed-by: ksrini
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties
langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Wed Feb 15 18:07:28 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Wed Feb 15 18:30:31 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -338,7 +338,7 @@
         }
     },
 
-    X("-X", STANDARD) {
+    HELP_EXTRA("--help-extra -X", STANDARD) {
         @Override
         public void process(Helper helper) throws OptionException {
            throw new OptionException(OK, helper::Xusage);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties	Wed Feb 15 18:07:28 2017 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties	Wed Feb 15 18:30:31 2017 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -205,7 +205,7 @@
 main.opt.J.desc=\
     Pass <flag> directly to the runtime system
 
-main.opt.X.desc=\
+main.opt.help.extra.desc=\
     Print a synopsis of nonstandard options and exit
 
 main.usage.foot=\n\
--- a/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java	Wed Feb 15 18:07:28 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testXOption/TestXOption.java	Wed Feb 15 18:30:31 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,16 @@
     }
 
     @Test
+    void testWithHelpExtraOption() {
+        javadoc("-d", "out1",
+                "-sourcepath", testSrc,
+                "--help-extra",
+                testSrc("TestXOption.java"));
+        checkExit(Exit.OK);
+        checkOutput(true);
+    }
+
+    @Test
     void testWithOption() {
         javadoc("-d", "out1",
                 "-sourcepath", testSrc,