RFR: JDK-8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]
John Hendrikx
jhendrikx at openjdk.org
Mon Jul 24 22:12:53 UTC 2023
On Mon, 24 Jul 2023 19:56:06 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix generic warnings
>
> modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManager.java line 143:
>
>> 141: */
>> 142: public void fireValueChanged(I instance, T oldValue) {
>> 143: Object data = getData(instance);
>
> The `data` value could be passed into this method, which would save a (potentially not devirtualized) method call.
Thanks, I'll look into that, it might speed up the 1 listener cases a bit. The same applies to OldValueCachingListenerManager#getValue I think. I know it isn't possible for the add/remove calls, as the data may change if they're nested, but for `fireValueChanged` I never really checked after going to this strategy.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1272805838
More information about the openjfx-dev
mailing list