On Fri, 20 Nov 2020 17:15:22 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:
> This change extends the functionality of the `@return` tag so that it can > also be used as an inline tag in the first sentence of a description. > > The goal is to be able to simplify the following common pattern: > > /** > * Returns the result. Optional additional text. > * @return the result > */ > int method() { > > by > > /** > * {@return the result} Optional additional text. > */ > int method() { > > Note: > > * The inline tag may only be used at the beginning of the description. A > warning will be given if it is used elsewhere. > * The expansion of the inline tag is `Returns " _content_ `.` where > _content_ is the content of the tag. > * If there is no block `@return` tag, the standard doclet will look for an > inline tag at the beginning of the description > * The inline tag can be inherited into overriding methods as if it was > provided as a block tag. This pull request has now been integrated. Changeset: b29f9cd7 Author: Jonathan Gibbons <j...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/b29f9cd7 Stats: 696 lines in 21 files changed: 584 ins; 29 del; 83 mod 8075778: Add javadoc tag to avoid duplication of return information in simple situations. Reviewed-by: prappo, jlahoda ------------- PR: https://git.openjdk.java.net/jdk/pull/1355