RFR: 8301761: The sorting of the SortedList can become invalid

Loay Ghreeb duke at openjdk.org
Thu Aug 8 20:22:06 UTC 2024


Fix an issue in `SortedList` where the sorting became incorrect when adding new items that are equal to existing items according to the comparator. The `SortedList` should consider the insertion index of these items to maintain the correct order.

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

Commit messages:
 - Merge branch 'master' into SortedList
 - Merge branch 'master' into SortedList
 - Add test case
 - Fix SortedList to maintain insertion order for equal elements

Changes: https://git.openjdk.org/jfx/pull/1519/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1519&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301761
  Stats: 37 lines in 2 files changed: 28 ins; 4 del; 5 mod
  Patch: https://git.openjdk.org/jfx/pull/1519.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1519/head:pull/1519

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


More information about the openjfx-dev mailing list