15 RFR(XS): 8165276: Spec states that invoke the premain method in an agent class if it's public but implementation differs

Laurence Cable larry.cable at oracle.com
Wed Jun 24 04:32:05 UTC 2020


should we not consider some form of depreciation here, and continue to 
support non-public pre-main invocation for some time while issuing a 
warning???

while we have a sample of agents that will not be affected there may be 
some agent that will fail terminally with this change

just a thought

- Larry

On 6/23/20 8:42 PM, serguei.spitsyn at oracle.com wrote:
> Hi Mandy,
>
> Thank you for looking at this!
>
>
> On 6/23/20 20:21, Mandy Chung wrote:
>> Hi Serguei,
>>
>> I'm glad that you have a patch for this.
>>
>> On 6/23/20 7:05 PM, serguei.spitsyn at oracle.com wrote:
>>> Please, review a fix for:
>>> https://bugs.openjdk.java.net/browse/JDK-8165276
>>>
>>>
>>> CSR draft (one CSR reviewer is needed before finalizing it):
>>> https://bugs.openjdk.java.net/browse/JDK-8248189
>>>
>>
>> The compatibility risk should be low (rather than minimal).
>
> I was not sure if it has to be minimal or low.
> Made it low now.
>
>
>> It says "All known Java agents define the premain method as public". 
>> It'd be useful to add a comment in the JBS issue to list the Java 
>> agents you have checked.
>
> I'm relying on the Alan's comments posted in the bug report:
>  "I checked a number of popular java agents and their premain methods 
> are public, I haven't found any where the premain was not public."
>  "I think we should just bite the bullet on this so that the premain 
> must be public as originally intended."
>
> Probably, my statement in the CSR is too strong.
> I've changed it to:
>  "No popular Java agent that defines the premain method as a 
> non-public was found."
>
> Does it looks better or you think we have to investigate existing 
> popular Java agents?
>
>
>>> Webrev:
>>> http://cr.openjdk.java.net/~sspitsyn/webrevs/2020/instr-setAccessible.1/ 
>>>
>>>
>>>
>>
>> Looks okay.  Can you add a test to verify this fix?
>
> Yes, I can add a test but it will be trivial.
>
> Thanks,
> Serguei
>
>
>>
>> Mandy
>



More information about the serviceability-dev mailing list