On Wed, 28 Oct 2026 00:30:00 GMT, Chen Liang <[email protected]> wrote:

>> Deprecate the `contains` method on `java.util.Hashtable`, 
>> `java.util.Properties`, and `java.util.concurrent.ConcurrentHashMap` for 
>> being confusing with `containsKey`.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Chen Liang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Redundant suppression

I would update the specs of the two methods in question to say simply,

    Equivalent to {@link #containsValue(Object) containsValue}.

The deprecation wording doesn't need to include the history; I'll put that into 
the CSR where historians can find it. I would replace the deprecation wording 
with something like this:

> This method is potentially confusing because its name does not indicate 
> whether it checks for the presence of a key or a value. Use {`@link` 
> #containsValue(Object) containsValue} instead.

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

PR Comment: https://git.openjdk.org/jdk/pull/33593#issuecomment-6675957764

Reply via email to