RFR: 8219628: [TESTBUG] javadoc/doclet/InheritDocForUserTags fails with -othervm
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Feb 26 21:28:50 UTC 2019
Javadoc folk,
Please review an updated webrev for this issue. This is Nick's change
(which I've reviewed) plus one additional line that I added so that the
test displays similar behavior in both agentvm and othervm jtreg modes.
I added the -sourcepath line in DocTest.java at line 54.
When approved, I'll push it as a joint contribution.
-- Jon
On 02/25/2019 05:58 PM, Nick Gasson (Arm Technology China) wrote:
> Hi Jonathan,
>
> Sounds fine, thanks for looking into this.
>
> Nick
>
> On 26/02/2019 09:55, Jonathan Gibbons wrote:
>> Nick,
>>
>> Thanks for the report, and for the analysis you did. While good, your
>> proposed fix
>> is not complete, as it does not address the issues in agentvm mode. Full
>> details
>> are in the comments in the JBS issue.
>>
>> I see you are a JDK Author, but not yet a Committer. I can get someone
>> else to
>> review my part of the patch and can then push this as a joint
>> contribution for you.
>>
>> -- Jon
>>
>>
>>
>> On 02/25/2019 02:09 AM, Nick Gasson (Arm Technology China) wrote:
>>> 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