RFR: JDK-8302019: Clarify Elements.overrides [v6]

Jonathan Gibbons jjg at openjdk.org
Thu Jan 25 21:18:36 UTC 2024


On Thu, 25 Jan 2024 21:13:54 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Snippet works; change pushed. Thanks.
>
> Annotations in snippets work as expected. A medium-while back we changed the rules for `@` inside inline tags so that `@` inside an inline tag does not prematurely terminate the inline tag and start a block tag. Thus, `@` can be used for annotations inside `{@snippet...}, `{@code ...}` and any other inline tag.
> 
> Aside, FWIW, as a result of seeing your initial version, I did a repo-wide search for legacy use of `@` (used a long time ago to avoid the annotation/block-tag conflict.).  The good news is that there are no other instances of `@` in OpenJDK, so we must have done a cleanup in times past.

While snippets do provide the ability to copy the code to the clipboard, they also provide stylistic consistency for the reader, which is good. And maybe one of these days, we'll add support for syntax highlighting ;-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17564#discussion_r1466968330


More information about the compiler-dev mailing list