On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess <[email protected]> wrote:
> 8186958: Need method to create pre-sized HashMap
test/jdk/java/util/Collections/CalculateHashMapCapacityTestJMH.java line 42:
> 40: public class CalculateHashMapCapacityTestJMH {
> 41:
> 42: private void consume(int tmp) {
You should pass a jmh Blackhole object in the parameter of test methods and
call its consume method. jmh will automatically pass the blackhole. This one
will be eliminated as dead code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7928