RFR 8039080: "jinfo server_id at host" fails with "Invalid process identifier"

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Mon Apr 7 12:22:21 UTC 2014


On 7.4.2014 14:10, shanliang wrote:
> Jaroslav,
>
> Is it necessary to add "ValidationException"?
Well, for the implementation when the validation is performed at the 
moment a new instance of JInfo is being created it is necessary.

>
> Could we change the constructor JInfo to:
>     private static boolean validateArgs(String[] args);
> the method returns false if the args are illegal, or throw an
> IllegalArgumentException
>
> and declare the variables "args" and "useSA" as static too,

Yes, of course this could be changed like this. What would be the 
expected benefits?

-JB-

>
> Shanliang
>
> Jaroslav Bachorik wrote:
>> Hi,
>>
>> Sorry for the noise but I need to get the fix re-reviewed.
>> Due to the way jtreg cooperates with TestNG when runnning in agentvm I
>> can not use package private methods or constructor or fields.
>>
>> The updated patch -
>> http://cr.openjdk.java.net/~jbachorik/8039080/webrev.01 - makes the
>> JInfo constructor a private one and removes the package private
>> getters. The test is using reflection to create new instances of JInfo
>> and to assert its state.
>>
>> Thanks,
>>
>> -JB-
>



More information about the serviceability-dev mailing list