RFR: JDK-8300914: Allow `@` as an escape in documentation comments [v2]
Jonathan Gibbons
jjg at openjdk.org
Fri Feb 3 19:01:55 UTC 2023
On Thu, 2 Feb 2023 19:52:36 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> test/langtools/tools/javac/doctree/AtEscapeTest.java line 39:
>>
>>> 37: /**
>>> 38: * abc
>>> 39: * @@tag
>>
>> I'd add a couple of tests to assert that `@@` and `@*` also work in the middle of a line. Unlike `@/`, which requires preceding `*`, `@@` and `@*` do not require preceding whitespace. That seems useful. In particular, `@@` could be used in the middle of a line for robustness. For example, one could prepend plaintext `@Override` in the middle of a line with an extra `@` to defend against text reflow that brings `@Override` to the beginning of a line.
>
> Will do.
Note that `@@` and `@*` are also context-sensitive, and can only be used where the unescaped character would have a different effect.
Nevertheless, the suggestion for additional tests to demonstrate the behavior is well-taken.
-------------
PR: https://git.openjdk.org/jdk/pull/12372
More information about the compiler-dev
mailing list