On Fri, 25 Sep 2020 10:23:54 GMT, Leon Linhart 
<github.com+4029915+themrmilchm...@openjdk.org> wrote:

>> modules/javafx.base/src/main/java/javafx/collections/ModifiableObservableListBase.java
>>  line 97:
>> 
>>> 95:             clear();
>>> 96:             addAll(col);
>>> 97:             return true;
>> 
>> I think following code would be more suitable here,
>> boolean res = super.addAll(c);
>> return res;
>> This code is already used in two `addAll()` methods of this class.
>
> Makes sense to me. I changed it accordingly.

I don't think this change is correct.  `setAll(Collection)` should return true 
if the list is modified. As discussed in
an [earlier comment](#issuecomment-684117392) this means returning true if 
either the existing Collection or the new
Collection is non-empty.

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

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

Reply via email to