NPE in Runner.run().entrySet() in JMH > 0.4.2

Roman Leventov leventov at ya.ru
Thu Apr 10 20:16:18 UTC 2014


FUCKING. GRADLE. No. I can't test with JMH from repo.

NPE with JMH 0.4.2 is useful, because "running" empty bench set makes no sense.
But throwing something like "EmptyPatternException" (unchecked) would be nicer
(the problem will be immediately clear from command line).

What about JMH > 0.4.2? You changed 1 line, it won't help to get results
(with JMH 0.5.6 I have NPE even when pattern match some methods).


10.04.2014, 22:57, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>:
> On 04/10/2014 10:44 PM, Roman Leventov wrote:
>
>>   BTW with JMH 0.4.2 this line also cause NPE when pattern (from
>>  command line) don't match any methods (for example, because of a
>>  typo).
>
> That's because we should not be that liberal with returning nulls. Fixed
> in tip [1]. Can you try to build the bleeding edge (1.0-SNAPSHOT) and
> try again?
>
> -Aleksey
>
> [1] http://hg.openjdk.java.net/code-tools/jmh/rev/44b34803e101


More information about the jmh-dev mailing list