JMH error Annotation generator had thrown the exception. java.lang.ClassCastException
R H
ralf at pkmd.de
Mon Mar 2 21:45:19 UTC 2020
Not sure if this is cleared up yet.
On 02.03.2020 20:05, Vipin Sharma wrote:
> @Benchmark
> public double test() {
> return 0;
> }
This is a suitable method for a benchmark: No arguments.
> @Benchmark
> public static <E extends Enum<E>> EnumSet<E> testEnumSet(E param) {
> return null;
> }
> }
This one is static, and it needs an argument to be called. Like Alexej
said, it is hard for JMH to know what argument you want to call the
method with. Better wrap this call in a suitable benchmark method that
takes no argument.
viel Spaß!
More information about the jmh-dev
mailing list