RFR: 8281631: HashMap copy constructor and putAll can over-allocate table [v28]
XenoAmess
duke at openjdk.java.net
Fri Mar 11 01:13:10 UTC 2022
On Thu, 10 Mar 2022 22:37:58 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Heads up here! java.lang.Integer is specified as a value based class and should not be used where identity is needed. https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/doc-files/ValueBased.html
>
> I don't have a ready suggestion, but be forewarned that this use is not considered valid.
@RogerRiggs
Sounds reasonable.
Could you please have a look at the latest commit? I tried to make a class to use as a key, instead of using integer.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7431
More information about the core-libs-dev
mailing list