RFR: JDK-8319139: Improve diagnosability of `JavadocTester` output

Jonathan Gibbons jjg at openjdk.org
Tue Oct 31 20:18:42 UTC 2023


Please review a small update to the output generated by `JavadocTester` when a test fails.

Although `JavadocTester` does report a stack trace, it appears after all the content of the failure message, which may be some distance away if the message is long.

The `String message` parameter for `passed` and `failed` is split in two: `String message, String... details` with the intent that the `message` should be a short one-line message, and any long additional info put in the effectively optional `details`.

The stack trace is now generated immediately after the initial `FAILED: `_message_ line and before the `details`.
Using a varargs `details` means that we do not have to concatenate strings with `\n`.

There are some other minor tweaks to the output to make it slightly less cryptic.

`JavadocTester` does have some specific tests of its own, and these are updated as appropriate.

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

Commit messages:
 - JDK-8319139: Improve diagnosability of `JavadocTester` output

Changes: https://git.openjdk.org/jdk/pull/16436/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16436&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8319139
  Stats: 81 lines in 3 files changed: 26 ins; 3 del; 52 mod
  Patch: https://git.openjdk.org/jdk/pull/16436.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16436/head:pull/16436

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


More information about the javadoc-dev mailing list