Skip to content

Wrong tagOrder in AtClauseOrder documentation. #10086

@Vyom-Yadav

Description

@Vyom-Yadav

From #9942 (comment)
https://checkstyle.org/config_javadoc.html#AtclauseOrder
The default tagOrder specified in documentation and actual default tagOrder differ.

Documentation-

* Default value is
* {@code @author, @deprecated, @exception, @param, @return, @see, @serial, @serialData, @serialField, @since, @throws, @version}.

Actual-

private static final String[] DEFAULT_ORDER = {
"@author", "@version",
"@param", "@return",
"@throws", "@exception",
"@see", "@since",
"@serial", "@serialField",
"@serialData", "@deprecated",
};

This change appeared in #6938 while sorting values alphabetically for String set properties.

Default order of tags is taken from:
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#orderoftags based on #306

Order of Tags
Include tags in the following order:
@author (classes and interfaces only, required)
@version (classes and interfaces only, required. See footnote 1)
@param (methods and constructors only)
@return (methods only)
@exception (@throws is a synonym added in Javadoc 1.2)
@see
@since
@serial (or @serialField or @serialData)
@deprecated (see How and When To Deprecate APIs)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions