-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8309991 | 11.0.21 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8305184 | 11.0.20-oracle | Shivangi Gupta | P4 | Resolved | Fixed | b01 |
When the above test is run with jtreg -othervm it fails with:
JavadocTester.java:99: error: unknown tag: Test
* @Test
^
However the test will pass if jtreg is run in the agentvm mode. But the agentvm mode seems to be hiding a bug in the test: InheritDocForUserTags/DocTest.java has a class SimpleInheritDocDocTest extends DocTest which uses the javadoc @inheritDoc tag to inherit its documentation from DocTest. But the javadoc comment for DocTest is incorrectly placed before the import statement at the top of the file, rather than directly preceeding the class declaration. DocTest's parent class JavadocTester then has an error in its doc comment: it has an unescaped @ in "@Test" in a code sample, which javadoc interprets as a documentation tag and then errors out on.
The reason it passes with -agentvm is that in this mode, javadoc cannot find the source file for JavadocTester and so uses the class file:
[loading /home/nicgas01/jdk/build/linux-aarch64-server-fastdebug/test-su\ pport/jtreg_test_langtools_jdk_javadoc_doclet_InheritDocForUserTags_DocT\ est_java/classes/0/jdk/javadoc/lib/javadoc/tester/JavadocTester.class]
Whereas with -othervm it can find the source file and parses it:
[loading /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/teste\ r/JavadocTester.java]
This seems to be because othervm mode will set -sourcepath whereas agentvm mode is missing this line:
source path: /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib
JavadocTester.java:99: error: unknown tag: Test
* @Test
^
However the test will pass if jtreg is run in the agentvm mode. But the agentvm mode seems to be hiding a bug in the test: InheritDocForUserTags/DocTest.java has a class SimpleInheritDocDocTest extends DocTest which uses the javadoc @inheritDoc tag to inherit its documentation from DocTest. But the javadoc comment for DocTest is incorrectly placed before the import statement at the top of the file, rather than directly preceeding the class declaration. DocTest's parent class JavadocTester then has an error in its doc comment: it has an unescaped @ in "@Test" in a code sample, which javadoc interprets as a documentation tag and then errors out on.
The reason it passes with -agentvm is that in this mode, javadoc cannot find the source file for JavadocTester and so uses the class file:
[loading /home/nicgas01/jdk/build/linux-aarch64-server-fastdebug/test-su\ pport/jtreg_test_langtools_jdk_javadoc_doclet_InheritDocForUserTags_DocT\ est_java/classes/0/jdk/javadoc/lib/javadoc/tester/JavadocTester.class]
Whereas with -othervm it can find the source file and parses it:
[loading /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/teste\ r/JavadocTester.java]
This seems to be because othervm mode will set -sourcepath whereas agentvm mode is missing this line:
source path: /home/nicgas01/jdk/test/langtools/jdk/javadoc/lib
- backported by
-
JDK-8305184 [TESTBUG] javadoc/doclet/InheritDocForUserTags fails with -othervm
- Resolved
-
JDK-8309991 [TESTBUG] javadoc/doclet/InheritDocForUserTags fails with -othervm
- Resolved
- relates to
-
JDK-4433516 Warn when doc comment is ignored
- Open