On Tue, 8 Sep 2026 14:17:01 GMT, Daniel Fuchs <[email protected]> wrote:
>> I've been using jdeps recently, and I thought I could suggest some minor
>> improvements to its documentation (and related code comments, for
>> completeness and consistency). Please review.
>>
>> Separately, I note that JDK tools inconsistently use CLI notation (i.e. {},
>> (), [], ... etc.) and verb forms ( 2nd person prescriptive (print) vs. 3rd
>> person descriptive (prints) ). Sometimes verb forms are mixed within a
>> single sentence. But that's a bigger issue, and I'm not trying to address it
>> in this PR. Maybe it's something an LLM-assisted person could do once we're
>> cleared to use LLMs in that way in OpenJDK.
>>
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/jdeps.properties
> line 137:
>
>> 135: \ compile-time view analysis and print\n\
>> 136: \ dependency summary. This option must
>> be used\n\
>> 137: \ with the --require, --package, or
>> --regex option.
>
> The rest of the proposed changes look reasonable to me. I have to wonder
> though if the option `must be used`, `can be used`, or `may be used`...
I believe the correct word is MUST, as in required/necessary. Here's the reason
(* is mine):
class InverseAnalyzeDeps extends AnalyzeDeps {
InverseAnalyzeDeps() {
}
@Override
boolean checkOptions() {
if (options.recursive != -1 || options.depth != -1) {
reportError("err.invalid.options", "--recursive and
--no-recursive", "--inverse");
return false;
}
if (options.numFilters() == 0) { // *
reportError("err.filter.not.specified");
return false;
}
As for the grammar, I was going to fix it in "This option must use with
--require ..." when it occurred to me to compare that bit with that of manpage.
The manpage wording was good, so I copied it verbatim.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32701#discussion_r3959415547