RFR: 8276966: Improve diagnostic output for the mismatching parts of a hybrid snippet

Hannes Wallnöfer hannesw at openjdk.org
Fri Oct 3 11:12:33 UTC 2025


Please review a trivial change to improve the error output for hybrid snippets with mismatching inline and external snippet text.

Since the logging code drops trailing blank lines, differences in trailing whitespace were not displayed properly. By adding a terminal separator we make sure trailing blank lines are not discarded. This makes it also easier to see where the snippet diff ends. 

Old output:


  ----------------- inline -------------------
  inline snippet
  ----------------- external -----------------
  external snippet


New output:


  ----------------- inline -------------------
  inline snippet
  ----------------- external -----------------
  external snippet
  --------------------------------------------

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

Commit messages:
 - 8276966: Improve diagnostic output for the mismatching parts of a hybrid snippet

Changes: https://git.openjdk.org/jdk/pull/27621/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27621&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8276966
  Stats: 4 lines in 2 files changed: 3 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27621.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27621/head:pull/27621

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


More information about the javadoc-dev mailing list