RFR(XXS): 8156226: DiagnosticCommandImpl::invoke throws NoSuchMethodException even if the method actually exists but parameters are wrong

Kirill Zhaldybin kirill.zhaldybin at oracle.com
Wed Jun 8 18:26:23 UTC 2016


Dear all,

After discussion with Mandy Chung, Daniel Fuchs and Frederic Parain we 
decided to provide separate error message for the case if method exists 
but signature or parametes are wrong but throw the same 
NoSuchMethodError exception.

Could you please review this fix for 8156226?

New WebRev: 
http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8156226/webrev.04/

CR: https://bugs.openjdk.java.net/browse/JDK-8156226

Thank you.

Regards, Kirill

On 06.05.2016 20:16, Kirill Zhaldybin wrote:
> Dear all,
>
> Could you please review this small fix for 8156226?
>
> A case when a method exists but parameters' signature is wrong now
> causes new ReflectionException(new IllegalArgumentException()) thrown
> instead of new ReflectionException(new NoSuchMethodException()).
>
> WebRev: http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8156226/webrev.00/
>
> CR: https://bugs.openjdk.java.net/browse/JDK-8156226
>
> Thank you.
>
> Regards, Kirill



More information about the serviceability-dev mailing list