[patch] Prevent NoSuchMethodError when compiling in IntelliJ IDEA
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon Oct 19 13:36:26 UTC 2015
Hi Evgeny,
Thanks for the patch! Unfortunately, to accept the patch and give you a
credit for it, we need a signed OCA, as per:
http://openjdk.java.net/contribute/
Here is tracking issue:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901536
Comments:
* I think the one-liner comment in current code should be extended to
explain why do we overwrite benchmark entries for the entire class. It
took me a while to understand from the code alone.
* This improvement --
https://bugs.openjdk.java.net/browse/CODETOOLS-7901537 -- brings in
BenchmarkListEntry.getUserClassQName(), which should be used instead of
substring() expression.
Thanks,
-Aleksey
On 10/19/2015 02:11 AM, Evgeny Mandrikov wrote:
> Excuse me - forgot to do attachment, here it is.
>
> On Mon, Oct 19, 2015 at 1:08 AM, Evgeny Mandrikov <mandrikov at gmail.com>
> wrote:
>
>> Hi Aleksey,
>>
>> Here is a scenario, which leads to NoSuchMethodError with IntelliJ IDEA
>> 14.1.4 :
>> a) generate the benchmark from archetype
>> b) open in IDEA
>> c) add one more benchmark method and psvm main() in MyBenchmark.java with
>> JMH API invocation
>> d) run it - all fine
>> e) remove one of benchmark methods
>> f) run it - NoSuchMethodError
>>
>> In attachment you'll find patch - quick attempt to address this issue.
>>
>> --
>> Best regards,
>> Evgeny Mandrikov aka Godin <http://godin.net.ru>
>> http://twitter.com/_godin_
>>
>
>
>
More information about the jmh-dev
mailing list