On Fri, 6 Nov 2026 16:36:53 GMT, Viktor Klang <[email protected]> wrote:
>> Chen Liang has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains four additional
>> commits since the last revision:
>>
>> - Simplify specs
>> - Merge branch 'master' of github.com:openjdk/jdk into
>> cleanup/hashtable-contains
>> - Redundant suppression
>> - Deprecate the hashtable contains methods
>
> src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java line
> 2151:
>
>> 2149: * This method is potentially confusing because its name does not
>> indicate
>> 2150: * whether it checks for the presence of a key or a value. Use
>> {@link
>> 2151: * #containsValue(Object) containsValue} instead.
>
> Might make sense to say something akin to "use containsValue or containsKey
> instead".
It is not right to ask an intentional user of `contains` to migrate to
`containsKey`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33593#discussion_r4495143004