RFR: 8357272: Add overrides for all default methods to wrapper collections

Stuart Marks smarks at openjdk.org
Wed Jun 25 17:06:40 UTC 2025


This mostly just adds overrides to the wrapper implementations in java.util.Collections. However, in order to satisfy the test, some overrides are also added to ReverseOrderSortedMapView, which is used by the SortedMap wrapper keySet, values, and entrySet views. These overrides don't do anything except to call super, so they're arguably dead code. However, they enable all combinations of sequenced map views to be tested, which is valuable.

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

Commit messages:
 - Override default methods in ReverseOrderSortedMapView.
 - Refactor tests of map views.
 - Remove stray import.
 - Edit Collections style comment; clean up Wrappers test.
 - Merge branch 'master' into JDK-8357272-override-all-defaults
 - Uncomment tests that depended on JDK-8358015, which is now fixed.
 - Merge branch 'master' into JDK-8357272-override-all-defaults
 - Merge branch 'master' into JDK-8357272-override-all-defaults
 - Temporarily comment out failing tests.
 - Remove changes that are now part of JDK-8358015.
 - ... and 7 more: https://git.openjdk.org/jdk/compare/ba0c1223...4f8483cf

Changes: https://git.openjdk.org/jdk/pull/25478/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25478&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8357272
  Stats: 308 lines in 3 files changed: 241 ins; 33 del; 34 mod
  Patch: https://git.openjdk.org/jdk/pull/25478.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25478/head:pull/25478

PR: https://git.openjdk.org/jdk/pull/25478


More information about the core-libs-dev mailing list