RFR: 8324573: HashMap::putAll should resize to sum of both map sizes

Joshua Cao duke at openjdk.org
Thu Jan 25 00:29:41 UTC 2024


On Wed, 24 Jan 2024 23:53:34 GMT, jmehrens <duke at openjdk.org> wrote:

> For any Map/Collection you can fetch the Spliterator and use estimateSize or getExactSizeIfKnown as both return size as a long.

Based on the code, I think this will just return the original size. It would be the same as casting `(long) size()`.

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

PR Comment: https://git.openjdk.org/jdk/pull/17544#issuecomment-1909145170


More information about the core-libs-dev mailing list