RFR: 8219628: [TESTBUG] javadoc/doclet/InheritDocForUserTags fails with -othervm
Nick Gasson (Arm Technology China)
Nick.Gasson at arm.com
Mon Feb 25 10:09:33 UTC 2019
Hi,
Please review this small patch to fix a failure of the above test when
run with the jtreg -othervm option:
Bug: https://bugs.openjdk.java.net/browse/JDK-8219628
Webrev: http://cr.openjdk.java.net/~ngasson/8219628/webrev.1/
It passes with -agentvm but with -othervm it fails with this error:
/home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java:99:
error: unknown tag: Test
* @Test
^
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.
This patch escapes the @ and also moves the doc comment for DocTest to
the correct place.
The difference between the two jtreg modes seems to be in the value for
the -sourcepath argument. In agentvm mode I see this line, where it
loads the JavadocTester class file:
[loading
/home/nicgas01/jdk/build/linux-aarch64-server-fastdebug/test-support/jtreg_test_langtools_jdk_javadoc_doclet_InheritDocForUserTags_DocTest_java/classes/0/jdk/javadoc/lib/javadoc/tester/JavadocTester.class]
And in othervm mode it loads and parses the source file:
[loading
/home/nicgas01/jdk/test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java]
I've attached the two .jtr files to the JBS issue.
Thanks,
Nick
More information about the javadoc-dev
mailing list