RFR: 8367439: Bulk change notifications for ObservableSet and ObservableMap
Michael Strauß
mstrauss at openjdk.org
Thu Oct 23 17:03:25 UTC 2025
On Thu, 23 Oct 2025 16:14:12 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> Before going into a full review, I'd like t ask this:
>
> 1. please enumerate all the bulk methods in `Map` and `Set` that support the new behavior in the description and possibly in the javadoc
`ObservableSetWrapper` and `ObservableMapWarpper` support bulk change notifications for all bulk operations. Since these classes aren't public API, the only place where we could document this for users is in `FXCollections.observableSet()` and `FXCollections.observableMap()`. I wonder if we want to document it explicitly, since it is supported in the entire framework by default. The only specification surface is then the new method on `SetChangeListener.Change` and `MapChangeListener.Change`.
> 2. do we have tests that cover all the bulk methods, exercising the following three scenarios:
>
> * `next()` is not called, received all changes individually (probably so, as it is the current behavior)
The bulk operation tests are excercised both for bulk retrieval and individual retrieval. See `ObservableSetWrapperTest.TestObservableSetWrapper`.
> * partial retrieval scenario where the remaining changes are received via individual events as described in javadoc and the description
`ObservableSetWrapper.partialChangeIterationCausesSubsequentListenerInvocation`
> * all changes received via the new methods
Yes, see above.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1885#issuecomment-3438114792
More information about the openjfx-dev
mailing list