On Fri, 9 Jul 2021 19:17:04 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

> Please review a simple change to the code for generating docs for JavaFX 
> properties, in order to suppress an inappropriate
> "missing comment" warning.
> 
> The change is to use `hasDocCommentTree` instead of `getDocCommentTree`.
> 
> A new test is added, that runs javadoc on similar classes, with and without a 
> comment on the field for a property. In both cases, no warnings about missing 
> comments should be generated, and when the comment is available, it is used 
> as expected.

The fix looks good. You'll just need to fix the whitespace problems in the test 
that `jcheck` reported.

It looks like the fix works. We still have quite a few warnings about missing 
comments, but almost all of them are actual problems with missing comments in 
various JavaFX methods. In at least two cases, they revealed methods that 
should not have been public in the first place or were misnamed (a property 
method name that was spelled incorrectly). This is good.

I did spot one odd warning. The following warning is on a private field that is 
not a property type, but is simply a `boolean`:


...\rt\modules\javafx.swing\src\main\java\javafx\embed\swing\JFXPanel.java:179: 
warning: no comment
    private boolean isCapturingMouse = false;
                    ^


This might be a different problem entirely. I'll go through the rest and see if 
I spot anything else.

There must be something about the `JFXPanel` class that is confusing javadoc. 
There are 13 warnings about missing comments, all of which are on private 
fields that are simple types (not properties).

I see this on a few other classes, too. Very odd.

Update: It looks like the above warnings on private fields are due to problems 
in those JavaFX files relating to serialization. In any case it completely 
unrelated to this PR, which fixes the problems reported in the bug.

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

Marked as reviewed by kcr (Author).

PR: https://git.openjdk.java.net/jdk/pull/4747

Reply via email to