On Wed, 15 Apr 2026 12:47:22 GMT, jengebr <[email protected]> wrote:

>> src/java.base/share/classes/java/util/HashMap.java line 502:
>> 
>>> 500:     @SuppressWarnings("unchecked")
>>> 501:     private void putHashMapEntries(HashMap<? extends K, ? extends V> 
>>> src, boolean evict) {
>>> 502:         Node<K,V>[] tab;
>> 
>> Can use `Node<? extends K, ? extends V>` here to avoid the redundant cast 
>> for `src.table`? The Node type in the loop can be replaced with var.
>
> I switched to Node<? extends K, ? extends V> but I hesitate to use var, since 
> it isn't used elsewhere in this file.  Mind if we proceed without that?

Sure, I was worried the full type would be too long to type/read.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28243#discussion_r3086729051

Reply via email to