On Thu, 9 Jul 2026 19:36:17 GMT, Andy Goryachev <[email protected]> wrote:

>> John Hendrikx has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fix flakey check on (asynchronous) stderr output
>
> modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerListBase.java
>  line 350:
> 
>> 348:             Object listener = CHANGE_LISTENERS.get(this, i);
>> 349: 
>> 350:             if (listener instanceof InvalidationListener il) {
> 
> a listener might implement both `InvalidationListener` and `ChangeListener`, 
> the logic here will break.

Indeed, a very nice catch. I'll resolve this by detecting this and wrapping 
such listeners. Wrapping is I think justified as such dual purpose listeners 
are extremely rare in practice, and it keeps the downstream logic the same; it 
also means the optimization for single listeners can remain in place (ie. if 
there is only one listener, we can store that directly in the `listenerData` 
field still as its type will always be unambiguous).

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r3559359117

Reply via email to