RFR: JDK-8290126: Add a check in JavadocTester for "javadoc should not crash"
Jonathan Gibbons
jjg at openjdk.org
Thu Jul 21 16:33:07 UTC 2022
On Wed, 20 Jul 2022 19:52:34 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> test/langtools/jdk/javadoc/lib/javadoc/tester/JavadocTester.java line 494:
>>
>>> 492: if (Files.exists(outputDir)) {
>>> 493: if (automaticCheckNoStacktrace) {
>>> 494: checkOutput(Output.STDERR, false, " at com.sun.");
>>
>> What is the reason for assuming package `com.sun` would be present in the stack trace? I notice that it is not present in the stack trace reported for the bug [JDK-8287379](https://bugs.openjdk.org/browse/JDK-8287379) which was recently fixed. Maybe we could additionally check for absence of boilerplate code like "An internal exception has occurred" or "Please file a bug against the javadoc tool ..."?
>
>> What is the reason for assuming package `com.sun` would be present in the stack trace? I notice that it is not present in the stack trace reported for the bug [JDK-8287379](https://bugs.openjdk.org/browse/JDK-8287379) which was recently fixed.
>
> That's one reason why I suggested test-driving the new check by retrofitting it in the four existing use cases. Note that doclet/testSnippetTag/SnippetTester.java:55 looks for matches of:
>
> Pattern.compile("\\s*at.*\(.*\.java:\\d+\)")
>
> While that pattern matches those exceptions from JDK-8287379, it might be too broad for the new check.
Ooops. I was (incorrectly) thinking of the old days, `com.sun.tools.javadoc` and `com.sun.tools.doclets`.
-------------
PR: https://git.openjdk.org/jdk/pull/9458
More information about the javadoc-dev
mailing list