RFR: 8367439: Bulk change notifications for ObservableSet and ObservableMap [v3]
Michael Strauß
mstrauss at openjdk.org
Fri Oct 24 00:04:22 UTC 2025
On Thu, 23 Oct 2025 22:16:09 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>>
>> - Merge branch 'master' into feature/bulk-listeners
>> - remove unused variable
>> - Don't repeatedly call backingSet.size()
>> - Separate code paths for Change/IterableChange
>> - Use MapListenerHelper in PlatformPreferences to support bulk change notifications
>> - Factor out IterableSetChange/IterableMapChange implementations
>> - add tests, documentation
>> - Implementation of bulk change listeners for ObservableSet and ObservableMap
>
> modules/javafx.base/src/test/java/test/com/sun/javafx/collections/ObservableMapWrapperTest.java line 78:
>
>> 76: "d added at key k4",
>> 77: "e added at key k5",
>> 78: "f added at key k6"),
>
> this is confusing (to me): I don't see the boundary created by the next() call (i.e. between the bulk and individual changes)
>
> or am I missing something?
This test demonstrates that the sequence of changes is the same, no matter the number of change listener invocations. For this purpose, we assert that the number of changes is as expected (6), but the number of invocations is only 3. In this sense, not seeing a boundary between the invocations is the point.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1885#discussion_r2458030203
More information about the openjfx-dev
mailing list