JDK-8271086 : Block comments of form '/***' are treated as javadoc comments
  • Type: Bug
  • Component: javafx
  • Sub-Component: other
  • Affected Version: openjfx17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-07-21
  • Updated: 2021-09-03
  • Resolved: 2021-07-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx17Fixed
Related Reports
Blocks :  
Description
 See JDK-8271083 for a general description.

Several JavaFX classes have block comments of the following form:

```
    /***************************************************************************
     * ...
     **************************************************************************/
```

This pattern is treated as a javadoc comment and should be avoided. It can cause problems if the element that follows is a field or method that doesn't otherwise have or need a comment. For example, Node.java has the following:

```
    /***************************************************************************
     *                                                                         *
     *                       Component Orientation Properties                  *
     *                                                                         *
     **************************************************************************/
    private ObjectProperty<NodeOrientation> nodeOrientation;
```

which causes "Component Orientation Properties" to be used as the definition of that field. It is then copied to the getter and setter instead of the description of the Property method.

https://openjfx.io/javadoc/16/javafx.graphics/javafx/scene/Node.html#getNodeOrientation()

This specific example will also lead to warnings from a future version of the javadoc tool, since there is redundant documentation on the field and the Property method.

We should avoid using a / followed by 3 or more asterisks in block comments.

Comments
Changeset: 78a3721a Author: Kevin Rushforth <kcr@openjdk.org> Date: 2021-07-28 17:23:42 +0000 URL: https://git.openjdk.java.net/jfx/commit/78a3721a2b126e174b5fd94ea1d15ccdbe6d3624
28-07-2021

Yes, and given that there are nearly 1000 such block comments in 185 files, that's basically what I plan to do (I'll replace the 2nd asterisk with a space to keep the line length the same).
22-07-2021

The workaround is obviously to add a space after the initial `/*`.
22-07-2021