Integrated: 8301763: Adding children to wrong index leaves inconsistent state in Parent#childrenSet

Lukasz Kostyra lkostyra at openjdk.org
Wed May 24 11:41:07 UTC 2023


On Mon, 15 May 2023 12:49:41 GMT, Lukasz Kostyra <lkostyra at openjdk.org> wrote:

> This issue happened because `childSet` member of Parent was modified during `onProposedChange()` call - that call did not recognize negative indexes as invalid, which caused an exception when actually adding the Node to a List.
> 
> This seemed like the simplest solution which doesn't rework a lot of code underneath. Exceptions coming from a backing list/collection technically are handled by `VetoableListDecorator`'s try-catch clauses, however `VetoableListDecorator` does not provide an interface to react when such an exception happens - without it we cannot revert `childSet` back to its original state.

This pull request has now been integrated.

Changeset: 4b24c869
Author:    Lukasz Kostyra <lkostyra at openjdk.org>
Committer: John Hendrikx <jhendrikx at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/4b24c8690d01634179571d24c8919469b209bec6
Stats:     110 lines in 3 files changed: 110 ins; 0 del; 0 mod

8301763: Adding children to wrong index leaves inconsistent state in Parent#childrenSet

Reviewed-by: jhendrikx, kcr

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

PR: https://git.openjdk.org/jfx/pull/1136


More information about the openjfx-dev mailing list