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

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


On Thu, 25 Jan 2024 20:37:02 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Is there a way to have `@Override` represented in the snippet? I can give that a try.
>> 
>> I don't think there is a strong need for this particular code and to be cut-and-pasted easily, but I can use more current features if possible.
>
> 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.

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

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


More information about the compiler-dev mailing list