RFR(XXS): 8156226: DiagnosticCommandImpl::invoke throws NoSuchMethodException even if the method actually exists but parameters are wrong
Kirill Zhaldbybin
kirill.zhaldybin at oracle.com
Tue Jun 14 21:13:13 UTC 2016
Daniel,
Thank you for review!
Regards, Kirill
On 06/10/2016 07:21 PM, Daniel Fuchs wrote:
> On 10/06/16 17:23, Kirill Zhaldybin wrote:
>> David, Daniel, Mandy,
>>
>> I changed the fix to provide "nicer" message in case if signature is
>> null.
>>
>> Here are a new WebRev:
>> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8156226/webrev.06/
>
> Looks good to me.
>
> -- daniel
>
>>
>> Could you please let me know your opinion?
>>
>> Thank you.
>>
>> Regards, Kirill
>>
>> On 10.06.2016 12:30, David Holmes wrote:
>>> On 10/06/2016 6:00 PM, Daniel Fuchs wrote:
>>>> Hi Kirill,
>>>>
>>>> I think you might get a NullPointerException in
>>>> Arrays.toString(signature) if signature == null,
>>>> so you should probably guard against that.
>>>
>>> Yes that addition to line 269 needs more attention as it is not guarded
>>> the way the previous variant is. Not sure what a zero-length array
>>> might
>>> produce either - for both you would want the representation of an
>>> "empty" signature.
>>>
>>> David
>>>
>>>> best regards,
>>>>
>>>> -- daniel
>>>>
>>>> On 09/06/16 13:09, Kirill Zhaldybin wrote:
>>>>> Mandy,
>>>>>
>>>>> Thank you for reviewing the fix!
>>>>>
>>>>> I added signature to another error message as you advised.
>>>>> Here are a new WebRev:
>>>>> http://cr.openjdk.java.net/~kzhaldyb/webrevs/JDK-8156226/webrev.05/
>>>>>
>>>>> Could you please let me know your opinion?
>>>>>
>>>>> Regards, Kirill
>>>>>
>>>>> On 08.06.2016 21:25, Mandy Chung wrote:
>>>>>>
>>>>>>> On Jun 8, 2016, at 11:26 AM, Kirill Zhaldybin
>>>>>>> <kirill.zhaldybin at oracle.com> wrote:
>>>>>>>
>>>>>>> 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/
>>>>>>
>>>>>> This looks okay. It’d be useful for the case line 269 to include
>>>>>> the
>>>>>> signature as well.
>>>>>>
>>>>>> Mandy
>>>>>>
>>>>>
>>>>
>>
>
More information about the serviceability-dev
mailing list