RFR: 8290844: Add Skin.install() method [v9]
Andy Goryachev
angorya at openjdk.org
Tue Oct 4 19:21:38 UTC 2022
On Tue, 4 Oct 2022 15:54:06 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/Control.java line 233:
>>
>>> 231: * @return the skin property for this control
>>> 232: * @throws IllegalArgumentException if {@code skin != null && skin != getSkinnable()}
>>> 233: */
>>
>> hmm .. shouldn't the condition be `(skin != null && skin.getSkinnable() != Control.this)`?
>
> Oops. My mistake (since Andy copied what I gave him), and good catch. I think the `Control.` is not needed here, since this is the documentation of a property in Control, so maybe just:
>
> `(skin != null && skin.getSkinnable() != this)`?
The check is actually inside of a StyleableObjectProperty, so Control.this is appropriate (see line 250), though I think the human-readable explanations in the same javadoc comment might be clear enough (I hope they are clear enough)
-------------
PR: https://git.openjdk.org/jfx/pull/845
More information about the openjfx-dev
mailing list