On Wed, 6 Mar 2024 18:26:16 GMT, Korov <d...@openjdk.org> wrote: > When the specified key did not associated with a value, should check the > `key` and `value` type.
Good caught. A trivial suggestion. test/jdk/java/util/Collections/CheckedMapBash.java line 192: > 190: Map m = Collections.checkedMap(new HashMap<>(), > Integer.class, Integer.class); > 191: m.merge("key", "value", (v1, v2) -> null); > 192: m.merge("key", 3, (v1, v2) -> v2); May be better to seperate these two cases into two tests. Because if the first case fails, the latter can't be verified now. ------------- Changes requested by gli (Committer). PR Review: https://git.openjdk.org/jdk/pull/18141#pullrequestreview-1921381700 PR Review Comment: https://git.openjdk.org/jdk/pull/18141#discussion_r1515457837