RFR: 8233179: VetoableListDecorator#sort throws IllegalArgumentException "duplicate children" [v2]

Michael Strauß mstrauss at openjdk.org
Tue Feb 25 18:53:48 UTC 2025


On Tue, 25 Feb 2025 16:21:30 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   factor out setAll implementation
>
> modules/javafx.base/src/main/java/com/sun/javafx/collections/VetoableListDecorator.java line 115:
> 
>> 113:             modCount--;
>> 114:             throw e;
>> 115:         }
> 
> Could this be replaced by `setAll(sortedList)`?

That would incur another unnecessary copy of the list. I've factored out the common `setAllImpl` instead to prevent these copies.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1674#discussion_r1970352937


More information about the openjfx-dev mailing list