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
On Thu, 23 May 2024 15:22:38 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> [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.
modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/Locator.java line 352:
> 350: // Only one '/' after the ':'.
> 351: if (protocol.equals("file")) {
> 352: // Map "file:/somepath" to "file:///somepath"
I did this one by hand, adding the `"` chars so that the automated program wouldn't touch the `///` in `file:///`.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1461#discussion_r1611906488
More information about the openjfx-dev
mailing list