This PR fixes the implementation of `ControlUtils.reducingChange`, which 
incorrectly computed adjacent removed indices, thus resulting in incorrect 
removal notifications.

Since there were no unit tests for this method, I also added a bunch of tests.

After applying this fix, I can no longer reproduce 
[JDK-8189354](https://bugs.openjdk.java.net/browse/JDK-8189354) and 
[JDK-8189228](https://bugs.openjdk.java.net/browse/JDK-8189228).

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

Commit messages:
 - Fix incorrect change notifications for removed items
 - Failing tests

Changes: https://git.openjdk.java.net/jfx/pull/480/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=480&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8189354
  Stats: 194 lines in 4 files changed: 175 ins; 9 del; 10 mod
  Patch: https://git.openjdk.java.net/jfx/pull/480.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/480/head:pull/480

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

Reply via email to