On Thu, 20 Feb 2025 16:25:33 GMT, Nizar Benalla <nbena...@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 four additional > commits since the last revision: > > - respond to feedback > - Merge branch 'master' into javadoc-usage-message > - update test with new usage message > - improve javadoc executable message src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java line 560: > 558: showLinesUsingKey("main.usage.short"); > 559: showLinesUsingKey("main.for-more-details-see-usage"); > 560: return OK; The currently used exit code is `2`, and the message is written to `stderr`, not `stdout`. I think these things should not be changed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23618#discussion_r1972045539