RFR: JDK-8223358: Incorrect HTML structure in annotation pages [v2]

Hannes Wallnöfer hannesw at openjdk.java.net
Tue Nov 9 20:14:44 UTC 2021


On Mon, 8 Nov 2021 19:59:36 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review feedback
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeMemberWriterImpl.java line 104:
> 
>> 102:                     MarkerComments.START_OF_ANNOTATION_INTERFACE_REQUIRED_MEMBER_SUMMARY));
>> 103:             case ANY -> throw new RuntimeException("unsupported member kind");
>> 104:         }
> 
> There are a number of `switch (kind) ....` statements. Would it help to put methods on the `Kind` enum?

Maybe I don't see how to do it, but these methods would have to return quite a lot of constants from all over the place. I don't think putting these into fields would make things much nicer.

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

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


More information about the javadoc-dev mailing list