RFR: 8251353: Many javafx scenegraph classes have implicit no-arg constructors [v2]
Nir Lisker
nlisker at openjdk.java.net
Tue Aug 25 09:18:56 UTC 2020
On Tue, 18 Aug 2020 23:47:07 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/css/PseudoClass.java line 83:
>>
>>> 82:
>>> 83: /**
>>> 84: * There is only one PseudoClass instance for a given pseudoClass.
>>
>> 1. Is having a public constructor for this class a good idea? Instances are created by a factory method.
>> 2. Both methods in this class need documentation update. `getPseudoClass` has a poor method description and the
>> formatting of the `@return` tag is wrong (lowercase and no period). `getPseudoClassName` is missing a description.
>
> Yes, this constructor is needed. `PseudoClass` is abstract, so it's constructor is just there for subclasses to call
> (note that for a constructor of an abstract class, `public` and `protected` mean the same thing).
> As for the other methods in the class, I agree that they should be changed...but in a follow-up issue.
Maybe we can add the method docs fixes to [JDK-8250590](https://bugs.openjdk.java.net/browse/JDK-8250590)?
-------------
PR: https://git.openjdk.java.net/jfx/pull/283
More information about the openjfx-dev
mailing list