RFR: JDK-8305713: DocCommentParser: merge blockContent and inlineContent [v5]
Jonathan Gibbons
jjg at openjdk.org
Tue Apr 18 17:28:14 UTC 2023
On Tue, 18 Apr 2023 13:22:32 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> Genuine question: what benefits are there in merging the blockContent method with the inlineContent method?
>
Generally, it seems better to have one method (instead of two) to handle "rich text content", when the similarities between the two are greater than the differences.
A different way of handling this might be to pull out common code into shared methods, but I still think it is better to have one "top-level" `switch` statement handling the characters that need appropriate (that is, non-default) treatment.
There were also some minor differences in the original two methods in handling uncommon situations (like `@`-escapes). By merging the two methods, we better ensure the same behavior where different behavior is not required.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13431#issuecomment-1513544290
More information about the compiler-dev
mailing list