> Please review this fix for `Set.ofLazy` and `Map.ofLazy` behaviour. > > When looking up an object that is equal to a stored candidate but is a > different instance, > `Set.contains()` and `Map.get()` pass the lookup argument to the computing > function instead of the stored candidate. > > This change stores the candidates in an array and uses the lookup index to > retrieve the corresponding candidate before calling the computing function. > > Regression tests have been added for both `Set` and `Map` to verify that the > computing function receives the stored candidate. > > Tests: > - `LazySetTest` > - `tier1` > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Daisuke Yamazaki has updated the pull request incrementally with one additional commit since the last revision: review ------------- Changes: - all: https://git.openjdk.org/jdk/pull/34144/files - new: https://git.openjdk.org/jdk/pull/34144/files/510dbc3f..94e1e2ef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=34144&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=34144&range=00-01 Stats: 165 lines in 3 files changed: 132 ins; 12 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/34144.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/34144/head:pull/34144 PR: https://git.openjdk.org/jdk/pull/34144
