RFR: JDK-8290126: Add a check in JavadocTester for "javadoc should not crash"

Hannes Wallnöfer hannesw at openjdk.org
Wed Jul 20 12:27:01 UTC 2022


On Tue, 12 Jul 2022 00:09:41 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> Please review a simple update to `JavadocTester` to provide a default-on check that no stack traces were written to the STDERR stream.
> 
> There are also some minor cleanup edits suggested by the IDE.

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 ..."?

-------------

PR: https://git.openjdk.org/jdk/pull/9458


More information about the javadoc-dev mailing list