RFR: 8350007: Add usage message to the javadoc executable [v5]
Nizar Benalla
nbenalla at openjdk.org
Mon Mar 10 13:02:02 UTC 2025
On Mon, 10 Mar 2025 12:58:17 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
>> This patch adds a new message when you run the `javadoc` executable with any arguments.
>> Currently, unlike most other tools, running `javadoc` without any arguments does not show you how to use the tool or point you to use the `--help` option, this can be improved.
>>
>> Before change:
>>
>> W $ ./javadoc
>> error: No modules, packages or classes specified.
>> 1 error
>>
>>
>> After change:
>>
>> W $ ./javadoc
>> Usage:
>> javadoc [options] [packagenames] [sourcefiles] [@files]
>> For additional help on usage: javadoc --help
>
> Nizar Benalla has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>
> - review feedback: improve error message
> - Merge branch 'master' into javadoc-usage-message
> - update test
> - keep the same return value and write to STDERR
> - respond to feedback
> - Merge branch 'master' into javadoc-usage-message
> - update test with new usage message
> - improve javadoc executable message
nizar-mac! $ javadoc
Usage:
javadoc [options] [packagenames] [sourcefiles] [@files]
For more details on available options, use --help or --help-extra
error: No modules, packages or classes specified.
1 error
flushing is necessary to print out the usage message consistently before the error
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23618#issuecomment-2710516531
More information about the compiler-dev
mailing list