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

Jonathan Gibbons jjg at openjdk.org
Tue Aug 16 23:54:36 UTC 2022


On Thu, 21 Jul 2022 16:35:28 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> > > This PR could use the feature it introduces. It would test drive the feature and ensure that the feature works. A brief search showed these potential candidates in test/langtools/jdk/javadoc/:
> > > 
> > > 1. doclet/InheritDocForUserTags/DocTest.java:57
> > > 2. tool/BadOptionsTest.java:83,96,108,120,132
> > > 3. doclet/testCustomTagletRegistration/TestRegistrationErrors.java:76
> > > 4. doclet/testSnippetTag/SnippetTester.java:55
> > 
> > 
> > Like other similar features, the feature is "default on", so it is currently active for all tests.
> 
> Then I assume you'll see test failures if you change ` at com.sun.` and don't update the tests that expect exceptions.

I removed the now almost useless check for `at com.com` in `DocTest.java` ... it was still minimally functional because of jtreg on the stack.

I left in all the other existing checks for no stack traces or exception because they do not exactly match the new check.

There are very few tests that actually check for exceptions: `TestTFMBuilder.java` is it, and that uses the new ability to disable the check for stack traces. See `TestTFMBuilder.java` line 164 in this PR.

If it needs to be said, all javadoc tests pass with these changes.

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

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


More information about the javadoc-dev mailing list