RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int)

liach duke at openjdk.java.net
Wed Apr 20 16:27:36 UTC 2022


On Tue, 19 Apr 2022 17:44:10 GMT, XenoAmess <duke at openjdk.java.net> wrote:

> These are the changes that too many to be reviewed in 8186958, thus split some of them out.

Would you consider replacing usages of `new HashMap<>(size, 1)`, such as in `AnnotationInvocationHandler`, as well? Such maps have a smaller table and are more likely to have collisions than `HashMap.newHashMap(size)`.

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

PR: https://git.openjdk.java.net/jdk/pull/8301



More information about the client-libs-dev mailing list