RFR: 8267329: Modernize Javadoc code to use instanceof with pattern matching [v2]

Jonathan Gibbons jjg at openjdk.java.net
Wed May 19 22:01:34 UTC 2021


On Wed, 19 May 2021 10:47:46 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Ian Graves has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Typos
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Messager.java line 71:
> 
>> 69:         if (!(instance instanceof Messager messenger))
>> 70:             throw new InternalError("no messager instance!");
>> 71:         return messenger;
> 
> Every project has quirks. Out of many quirks of JavaDoc, we love this one the most. Perhaps you misread that type's name: it's Messager [sic!]. Please rename the variable either to `messager` or to a shorter one.

@pavelrappo let's consider changing this name sometime (not now)

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

PR: https://git.openjdk.java.net/jdk/pull/4105


More information about the javadoc-dev mailing list