-
Bug
-
Resolution: Fixed
-
P3
-
15, 17, 18
-
b29
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289415 | 20 | Jonathan Gibbons | P3 | Resolved | Fixed | b04 |
JDK-8291354 | 19.0.2 | Jonathan Gibbons | P3 | Resolved | Fixed | b01 |
JDK-8291197 | 19.0.1 | Jonathan Gibbons | P3 | Resolved | Fixed | b04 |
A DESCRIPTION OF THE PROBLEM :
If a record has a compact constructor, a comment for the constructors describing the parameters is required even if the parameters have already been described in the record comment.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simply "javadoc X.java"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No warnings
ACTUAL -
X.java:7: warning: no @param for i
public X { }
---------- BEGIN SOURCE ----------
/**
* Comment.
* @param i comment
*/
public record X(int i) {
/** Comment. */
public X { }
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move the parameter description to the comment of the constructor.
FREQUENCY : always
If a record has a compact constructor, a comment for the constructors describing the parameters is required even if the parameters have already been described in the record comment.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Simply "javadoc X.java"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No warnings
ACTUAL -
X.java:7: warning: no @param for i
public X { }
---------- BEGIN SOURCE ----------
/**
* Comment.
* @param i comment
*/
public record X(int i) {
/** Comment. */
public X { }
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move the parameter description to the comment of the constructor.
FREQUENCY : always
- backported by
-
JDK-8289415 Bogus warning generated for record with compact constructor
-
- Resolved
-
-
JDK-8291197 Bogus warning generated for record with compact constructor
-
- Resolved
-
-
JDK-8291354 Bogus warning generated for record with compact constructor
-
- Resolved
-
- relates to
-
JDK-8275199 Bogus warning generated for serializable records
-
- Resolved
-
-
JDK-8309252 automatic copying of record constructor @param, similar to method overrides
-
- New
-
(2 links to)