NPE when generating benchmark code

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed May 21 12:15:25 UTC 2014


Hi Mark,

On 05/21/2014 03:51 PM, Mark Price wrote:
> Hi, I'm using JMH in the non-recommended ant mode, and seeing an
> exception while compiling my benchmark.

Just checked our jmh-ant-sample and it works, which means the problem is
specific to your scenario. The attachments were scrubbed, but I got them
in the moderator note. Can you publish the Ant build file as well? "ant
-v" and "java -version" would also be appreciated.

These lines are important:

> [javac] error: Compiler control generators had thrown the unexpected
> exception java.lang.NullPointerException
...
> [javac] 	at
> org.openjdk.jmh.generators.core.CompilerControlPlugin.process(CompilerControlPlugin.java:67)

That's a separate @CompilerControl processor, and this is why the
benchmark is still generated.

> though it seems to generate a file for the single benchmark that I
> have included (attached, along with original benchmark source).

No need to publish the generated source.

Thanks,
-Aleksey.


More information about the jmh-dev mailing list