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

jmehrens duke at openjdk.org
Wed Jan 24 23:56:27 UTC 2024


On Wed, 24 Jan 2024 21:53:51 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

>...then suggest we should change the Map::size() api to return a long...

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

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

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


More information about the core-libs-dev mailing list