Details
-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Just permits the use of a previously invalid syntax
-
File or wire format
-
JDK
Description
Summary
Permit use in comments of lines beginning @
in inline tags
Problem
It is currently disallowed to have a line in an inline tag that begins with whitespace @
in a documentation comment. The line is treated as if
the inline tag has been prematurely terminated (causing an error) and then the line treated as the beginning of a block tag.
This means it is not possible to place code samples containing annotations in an inline tag, because the standard practice is to place annotations (which begin with @
) at the beginning of a line. This leads to some dreadful hack workarounds.
Solution
It is already the case that braces inside an inline tag must be "balanced", meaning an equal number of {
and matching }
characters. Given that rule, there is no ambiguity with a line beginning with whitespace @
Specification
The Documentation Comment Specification for the Standard Doclet is amended to include the following text:
Lines beginning with @ that are enclosed within an inline tag are not considered as beginning a block tag.
Attachments
Issue Links
- csr of
-
JDK-8241780 Allow \n@ inside inline tags.
- Resolved
- relates to
-
JDK-8287100 [spec] Clean up terminology regarding doc comment descriptions.
- Resolved
-
JDK-8241780 Allow \n@ inside inline tags.
- Resolved
-
JDK-8237241 [specification] inline tag brace balancing is not documented
- Closed