Details
-
Bug
-
Resolution: Fixed
-
P3
-
11, 14
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8247288 | 15 | Jonathan Gibbons | P3 | Resolved | Fixed | b27 |
Description
ADDITIONAL SYSTEM INFORMATION :
openjdk full version "14+36-1461"
A DESCRIPTION OF THE PROBLEM :
The behavior of Xdoclint's "missing" group doesn't work as expected for javadoc (note that it does for javac)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* create 2 directories, 1 named "docs", 1 named "foo"
* in "foo", create a file Doc.java as provided below
* open a terminal in "docs" and run the following 2 commands:
** javadoc -private -Xdoclint:all ../foo/Doc.java
** javac -Xdoclint:all ../foo/Doc.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Both commands give equivalent results and report 3 warnings, namely:
..\foo\Doc.java:4: warning: documentation comment not expected here
package foo;
^
..\foo\Doc.java:6: warning: no comment
public class Doc {
^
..\foo\Doc.java:8: warning: no comment
public void bar() {
^
3 warnings
ACTUAL -
The javadoc command doesn't report any warnings, whereas the javac command reports the expected result.
---------- BEGIN SOURCE ----------
/**
* Something unexpected.
*/
package foo;
public class Doc {
public void bar() {
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use javac instead of javadoc
openjdk full version "14+36-1461"
A DESCRIPTION OF THE PROBLEM :
The behavior of Xdoclint's "missing" group doesn't work as expected for javadoc (note that it does for javac)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
* create 2 directories, 1 named "docs", 1 named "foo"
* in "foo", create a file Doc.java as provided below
* open a terminal in "docs" and run the following 2 commands:
** javadoc -private -Xdoclint:all ../foo/Doc.java
** javac -Xdoclint:all ../foo/Doc.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Both commands give equivalent results and report 3 warnings, namely:
..\foo\Doc.java:4: warning: documentation comment not expected here
package foo;
^
..\foo\Doc.java:6: warning: no comment
public class Doc {
^
..\foo\Doc.java:8: warning: no comment
public void bar() {
^
3 warnings
ACTUAL -
The javadoc command doesn't report any warnings, whereas the javac command reports the expected result.
---------- BEGIN SOURCE ----------
/**
* Something unexpected.
*/
package foo;
public class Doc {
public void bar() {
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use javac instead of javadoc
Attachments
Issue Links
- backported by
-
JDK-8247288 -Xdoclint doesn't report missing/unexpected comments
-
- Resolved
-
- relates to
-
JDK-8251202 Correct "no comment" warnings from javadoc in core-libs packages
-
- In Progress
-