Jigsaw Enhancement RFR round #2: 8159145 Add JVMTI function GetModuleByPackageName

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Thu Jun 23 00:02:33 UTC 2016


On 6/22/16 16:40, David Holmes wrote:
> On 23/06/2016 9:20 AM, serguei.spitsyn at oracle.com wrote:
>> On 6/22/16 15:31, David Holmes wrote:
>>> On 23/06/2016 5:01 AM, Alan Bateman wrote:
>>>> On 22/06/2016 19:36, serguei.spitsyn at oracle.com wrote:
>>>>
>>>>>
>>>>> Alan, please, let me know if you support the Stanislav's suggestion.
>>>>> I can go ahead and implement returning the
>>>>> JVMTI_ERROR_ILLEGAL_ARGUMENT for invalid package names.
>>>> No objection from me. It would be good to first check the existing 
>>>> spec
>>>> and also the JNI spec to see if there any similar cases (so that the
>>>> update and new function is consistent). Off-hand, I can't think of any
>>>> functions that require the same check.
>>>
>>> Taking GetLocalVariableTable as an example there is no validation that
>>> names are legal, so there should not be a check in this case either.
>>
>> David,
>>
>> I agree with it.
>> Thank you for pointing to this JVMTI example.
>> I did not find in the JNI where the names are checked to be legal.
>> We are going to open a can of worms with this kind of check as there can
>> be many corner cases to cover.
>
> Right - JVM TI and JNI both do minimal argument checking/validation.
>
> You may want to specify an error for the NULL case - or else treat it 
> as the empty string (which would need documenting).

It is already there.
It is a part of the universal-error :
http://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#universal-error

Thanks,
Serguei

>
> Cheers,
> David
>
>> Thanks,
>> Serguei
>>
>>
>>>
>>> Thanks,
>>> David
>>> -----
>>>
>>>> -Alan
>>



More information about the serviceability-dev mailing list