RFR: 8296420: javac has long lines in its command-line help [v3]

Archie L. Cobbs duke at openjdk.org
Tue Apr 4 18:01:08 UTC 2023


On Tue, 4 Apr 2023 17:34:27 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Archie L. Cobbs has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Show all offending lines in exception message, not just the first.
>>  - Relocate help text split point to just after a period.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties line 335:
> 
>> 333:     are found for an implicitly compiled class
>> 334: javac.opt.preview=\
>> 335:     Enable preview language features. To be used in conjunction\n\
> 
> I'd consider breaking "early", after the initial period.

Fixed in b43a1ca1c6a.

> test/langtools/tools/javac/options/HelpOutputColumnWidthTest.java line 88:
> 
>> 86:         if (tooLongLine != null)
>> 87:             throw new Exception("output line too long: \"" + tooLongLine.trim() + "\"");
>> 88:     }
> 
> This is good. It would be even better if you removed `findFirst` and then reported all the lines if the resulting list is non-empty.

Nice idea. Fixed in 2137122d8a6.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13329#discussion_r1157589525
PR Review Comment: https://git.openjdk.org/jdk/pull/13329#discussion_r1157588934


More information about the compiler-dev mailing list