On Fri, 17 Nov 2023 21:43:34 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

>> Back when DocLint lived in jdk.compiler, neither jdk.javadoc had access to 
>> DocLint, nor DocLint had access to jdk.javadoc. Since DocLint moved to 
>> jdk.javadoc, some redundancy can be eliminated and functionality shared; 
>> AccessKind is one such functionality.
>> 
>> There's more that could be done here. For example, 
>> jdk.javadoc.internal.doclint.Messages.Options can be simplified more. 
>> However, it's a separate issue.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/AccessLevel.java line 
> 59:
> 
>> 57:                 && PROTECTED.ordinal() == 2
>> 58:                 && PUBLIC.ordinal() == 3;
>> 59:     }
> 
> While not wrong, this is a weird not-recommended use of `.ordinal()`.
> How much is the order actually relied on?

A different solution, is one is really needed, would be a regression test to 
verify the expected order.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16714#discussion_r1397917620

Reply via email to