[PATCH] 8188240: Reflection Proxy should skip static methods

David Holmes david.holmes at oracle.com
Thu Mar 15 09:38:28 UTC 2018

On 15/03/2018 5:56 PM, Peter Levart wrote:
> Hi Aleksey,
> In test, the following comment:
>    26  * @summary This is a test to ensure that proxies do not inherit 
> static methods.
> I think the word "inherit" is not correct here. Interface static methods 
> can not be inherited. VM already ensures that. Perhaps the comment 
> should be:
>      "This is a test to ensure that proxies do not try to override 
> interface static methods."
> Nothing can actually override an interface static method even if it 
> tries to (in the sense class static methods may be overridden). So I 
> think this test checks that proxy class doesn't try to do this, right?

To be pedantic, talking about "overriding static methods" is as wrong as 
talking about "inheriting static methods. They can't be inherited and so 
can't be overridden.

In this context perhaps "intercept" would be a better choice? Or even 


> Regards, Peter
> On 03/14/2018 11:04 PM, Aleksey Shipilev wrote:
>> On 03/14/2018 10:44 PM, mandy chung wrote:
>>> David - I think the test fails even in your first version.
>>> It should use ProxyClashTest.class.getClassLoader() to define the 
>>> proxy class as the test is running
>>> in agent vm mode.
>> Right. This passes local testing:
>>   http://cr.openjdk.java.net/~shade/8188240/webrev.02/
>> ...and I am going to redo jdk/submit.
>> -Aleksey

More information about the core-libs-dev mailing list