RFR: 8189354: ArrayIndexOutOfBoundsException when listening to selection changes on TreeTableView
Kevin Rushforth
kcr at openjdk.java.net
Sat Apr 24 18:32:25 UTC 2021
On Sat, 24 Apr 2021 04:11:28 GMT, mstr2 <github.com+43553916+mstr2 at openjdk.org> wrote:
> 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).
I'll leave it to Ajit to review (I can be a second reviewer if needed). I noted one part of the change that needs to be reverted.
Also, if you could explain the logic changes a bit, that would be helpful.
modules/javafx.controls/src/main/java/javafx/scene/control/ControlUtils.java line 41:
> 39:
> 40: class ControlUtils {
> 41: private ControlUtils() { }
The private constructor needs to be restored, since it is the pattern we use for static helper classes that should not be instantiated.
-------------
PR: https://git.openjdk.java.net/jfx/pull/480
More information about the openjfx-dev
mailing list