On Tue, 11 Jun 2024 12:45:10 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> Nizar Benalla has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Remove classpath exception
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/HtmlTag.java line 
> 556:
> 
>> 554:     }
>> 555: 
>> 556:     private final EnumSet<Attr> GLOBAL_ATTRS = EnumSet.of(
> 
> I get it, you cannot make it static because it's used in an enum ctor. But 
> attaching it to every single enum constant seems wasteful.

If we are ordering the entries, we can use comparable to check that an attr is 
greater than the start of the global attr, something like

private static boolean isGlobalAttr(Attr value) {
    return value.compareTo(Attr.ACCESSKEY) >= 0;
}

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19652#discussion_r1634905873

Reply via email to