-
CSR
-
Resolution: Approved
-
P3
-
None
-
source, behavioral
-
minimal
-
The only change is to provide additional information on the documentation pages for nested classes.
-
File or wire format, Other
-
JDK
Summary
The behavior of the standard doclet is changed to use default values if necessary for @since
, @author
and @version
on nested classes.
Problem
If any of @since
, @author
, @version
are missing on a nested class, no value will be reported on the corresponding generated page. To determine the value, an end-user would have to click through to the page for the enclosing class.
Solution
When any of @since
, @author
, or @version
are missing on a nested class, recursively look for corresponding tags
on the enclosing class or interface.
Specification
There are no changes to the syntactic forms of any tags. The following changes to Doc Comment Specification provide additional rules as to how the standard doclet will handle the lack of certain tags in the main description for member types:
--- a/.../src/jdk.javadoc/share/specs/javadoc/doc-comment-spec.md
+++ b/.../src/jdk.javadoc/share/specs/javadoc/doc-comment-spec.md
@@ -368,6 +368,9 @@ between names. In the latter case, the entire text is copied to the generated
document without being parsed. Therefore, you can use multiple names per line
if you want a localized name separator other than a comma.
+If there are no `@author` tags in the description for a member class or interface,
+the standard doclet will (recursively) look for any such tags in the enclosing class or interface.
+
Introduced in JDK 1.0.
### {@code}
@@ -933,6 +936,9 @@ was added to the reference implementation. Multiple `@since` tags are allowed
and are treated like multiple [`@author`](#author) tags. You could use multiple
tags when the program element is used by more than one API.
+If there are no `@since` tags in the description for a member class or interface,
+the standard doclet will (recursively) look for any such tags in the enclosing class or interface.
+
Introduced in JDK 1.1.
### @snippet
@@ -1314,6 +1320,9 @@ space between the names. In the latter case, the entire text is copied to the
generated document without being parsed. Therefore, you can use multiple names
per line when you want a localized separator other than a comma.
+If there are no `@version` tags in the description for a member class or interface,
+the standard doclet will (recursively) look for any such tags in the enclosing class or interface.
+
Introduced in JDK 1.0.
In addition, the following clarifications are made to the javadoc
"man" page,
regarding options related to these tags.
--- a/.../src/jdk.javadoc/share/man/javadoc.md
+++ b/.../src/jdk.javadoc/share/man/javadoc.md
@@ -1,5 +1,5 @@
---
-# Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
#
title: 'JAVADOC(1) JDK @@VERSION_SHORT@@ | JDK Commands'
@@ -354,7 +354,7 @@ The following options are provided by the standard doclet.
_html-code_.
<span id="option-author">`-author`</span>
-: Includes the `@author` text in the generated docs.
+: Includes the text of any `@author` tags in the generated documentation.
<span id="option-bottom">`-bottom` *html-code*</span>
: Specifies the text to be placed at the bottom of each generated page.
@@ -714,8 +714,8 @@ The following options are provided by the standard doclet.
`-noqualifier` option is used.
<span id="option-nosince">`-nosince`</span>
-: Omits from the generated documents the `Since` sections associated with the
- `@since` tags.
+: Omits from the generated documentation the `Since` sections derived from
+ any `@since` tags.
<span id="option-notimestamp">`-notimestamp`</span>
: Suppresses the time stamp, which is hidden in an HTML comment in the
@@ -895,8 +895,9 @@ The following options are provided by the standard doclet.
**USE** link in the navigation bar.
<span id="option-version">`-version`</span>
-: Includes the version text in the generated docs. This text is omitted by
- default. To find out what version of the `javadoc` tool you are using, use
+: Includes the text of any `@version` tags in the generated documentation.
+ This text is omitted by default.
+ Note: To find out what version of the `javadoc` tool you are using, use
the `--version` option (with two hyphens).
<span id="option-windowtitle">`-windowtitle` *title*</span>
- csr of
-
JDK-8324342 Doclet should default @since for a nested class to that of its enclosing class
-
- Resolved
-