[PATCH] 8188240: Reflection Proxy should skip static methods

Peter Levart peter.levart at gmail.com
Thu Mar 15 12:40:21 UTC 2018



On 03/15/2018 09:57 AM, Aleksey Shipilev wrote:
> On 03/15/2018 08:56 AM, 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."
> I think word "inherited" there is in "proxy-inherited" sense. "Override" does not seems fitting
> either: proxy does not override.

It does some of them:
- the default interface methods are overridden and their implementation 
wired to InvocationHandler.
- the abstract interface methods are implemented and their 
implementation wired to InvocationHandler.

Static interface methods can't be overridden. That's why I wrote that 
test checks that proxies do not "try to override" and not "override". 
But maybe "trying an impossible thing" is not the right way to express 
something. David Holmes might have better words for it.

Regards, Peter

>   Maybe this:
>
>   This is a test to ensure that proxies do not try to capture interface static methods.
>
> -Aleksey
>



More information about the core-libs-dev mailing list