JDK 12 RFR of JDK-8146726 : Refactor AbstractProcessor to use Set.of and related methods (original) (raw)

Ivan Gerasimov ivan.gerasimov at oracle.com
Thu Nov 29 02:52:49 UTC 2018


Hi Joe!

In two places the expected numbers of elements is used instead of the initial capacity of a new HashSet:

new HashSet<>(values.length);

Wouldn't the default initial capacity (i.e. new HashSet<>() ) be better choice here, as the number of values is likely to be small and the HashSet is temporary anyway?

With kind regards,

Ivan

With kind regards, Ivan Gerasimov



More information about the compiler-dev mailing list