RFR: JDK-8328006: refactor large anonymous inner class in HtmlDocletWriter

Jonathan Gibbons jjg at openjdk.org
Tue Mar 12 20:14:20 UTC 2024


Please review a conceptually simple change, to move a large anonymous inner class to be a named inner class.

While most of the code is simply moved, two simple changes were necessary.  In `visitEscape` and `visitText` the variable `result` from the enclosing lexical scope was accessed directly. The change is simply to use the equivalent value `content` which is passed to each `visit...` call.

No tests needed updating. All javadoc tests pass.

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

Commit messages:
 - JDK-8328006: refactor large anonymous inner class in HtmlDocletWriter

Changes: https://git.openjdk.org/jdk/pull/18252/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18252&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8328006
  Stats: 277 lines in 1 file changed: 110 ins; 88 del; 79 mod
  Patch: https://git.openjdk.org/jdk/pull/18252.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18252/head:pull/18252

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


More information about the javadoc-dev mailing list