RFR: 8332732: Clean up non-standard use of /// comments in JavaFX

Kevin Rushforth kcr at openjdk.org
Thu May 23 15:28:28 UTC 2024


[JDK-8298405](https://bugs.openjdk.org/browse/JDK-8298405) added markdown support to javadoc, using `///` to indicate markdown documentation comments. As a result, building JavaFX docs with JDK 23 produces new warnings, which causes the build to fail (since we treat warnings as errors).

This PR was generated by running a program to automate the modification of each line that contains three or more slash chars in a row, `///` (except those in String literals). The replacement algorithm is as follows:

1. Replace each occurrence of exactly 3 slash chars `///` with 2 slash chars `//`
2. Replace each occurrence of 4 or more slash chars with an equal number of `-` chars, leaving the first two `//` chars of the first run of `////` as is.

This is similar to the proposed fix in java.base for [JDK-8331879](https://bugs.openjdk.org/browse/JDK-8331879) / PR openjdk/jdk#19130 (except for how I propose to handle the case of exactly three slashes).

As an alternative approach, I could fix just the 5 javadoc comments causing the error, and leave the rest alone, but this will prevent problems from cropping up in the future, and is in keeping with changes going into the JDK source base.

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

Commit messages:
 - Replace all occurrences of '///'

Changes: https://git.openjdk.org/jfx/pull/1461/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1461&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8332732
  Stats: 1309 lines in 50 files changed: 0 ins; 0 del; 1309 mod
  Patch: https://git.openjdk.org/jfx/pull/1461.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1461/head:pull/1461

PR: https://git.openjdk.org/jfx/pull/1461


More information about the openjfx-dev mailing list