On Wed, 12 Feb 2020 11:29:24 GMT, Jeanette Winzenburg <faste...@openjdk.org> 
wrote:

>> /signed
>> 
>> I have signed the Oracle Contributor Agreement today. Have not received back 
>> any confirmation yet though.
> 
> hmm ... wouldn't the change violate spec of adding listeners:
> 
>> If the same listener is added more than once, then it will be notified more 
>> than once.

> hmm ... wouldn't the change violate spec of adding listeners:
> 
> > If the same listener is added more than once, then it will be notified more 
> > than once.

True, I hadn't read that spec in ObservableValueBase. 
Although that does seem odd behaviour to me. Obviously as the original 
implementation was using an array I can see how the implementation drove that 
specification.

Non of the JavaFx unit tests test for that specific case as the unit tests all 
passed. It would be nice if there was a specific test case for this behaviour.

I would need to store a registration count for each listener to satisfy this 
requirement.

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

PR: https://git.openjdk.java.net/jfx/pull/108

Reply via email to