RFR: JDK-8305885: Use ReadOnly*PropertyBase class where possible [v4]

John Hendrikx jhendrikx at openjdk.org
Mon Apr 17 08:40:46 UTC 2023


On Mon, 17 Apr 2023 07:33:07 GMT, Nir Lisker <nlisker at openjdk.org> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix review comment
>
> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 8566:
> 
>> 8564:                 addToSceneDirtyList();
>> 8565:             }
>> 8566:             if (treeVisibleProperty != null) {
> 
> This change causes the property to not be initialized when this method is called. I think that this is fine as I don't see any reliance on the previous behavior, but it might be worth to take another look at that.

Yeah, I think this is what was originally intended here; it's pointless to "create" the property just to invalidate it, as there is no one listening, because if there was someone listening, the property would have to have been created already.  So this is causing the property to be created by default for all nodes without a good reason.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1092#discussion_r1168363846


More information about the openjfx-dev mailing list