Re: Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread mandy chung
Your contribution is welcome and I can sponsor it. Mandy On 10/2/17 1:44 PM, Eric McCorkle wrote: You beat me to it :D I will see if I can fix it myself (though it's been a some time since I committed any changes). On 10/02/2017 16:39, mandy chung wrote: FYI. I created https://bugs.openjdk.j

Re: Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread Eric McCorkle
You beat me to it :D I will see if I can fix it myself (though it's been a some time since I committed any changes). On 10/02/2017 16:39, mandy chung wrote: > FYI. I created https://bugs.openjdk.java.net/browse/JDK-8188240 for this > issue. > > Mandy > > On 10/2/17 1:33 PM, mandy chung wrote: >

Re: Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread mandy chung
FYI. I created https://bugs.openjdk.java.net/browse/JDK-8188240 for this issue. Mandy On 10/2/17 1:33 PM, mandy chung wrote: I believe it is a bug.   To invoke a static method in the proxy interface, it will have to do "I1.foo()" or "I2.foo()".  It won't invoke through the proxy object, i.e.

Re: Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread mandy chung
I believe it is a bug.   To invoke a static method in the proxy interface, it will have to do "I1.foo()" or "I2.foo()".  It won't invoke through the proxy object, i.e. it's not interceptible.  Even creating a proxy for I1, the generated proxy class includes an instance method named "foo" and no

Re: Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread Remi Forax
Hi Eric, I can reproduce the bug, as you said, in ProxyGenerator.generateClassFile() only the instance methods should be collected. cheers, Rémi - Mail original - > De: "Eric McCorkle" > À: "core-libs-dev" > Envoyé: Lundi 2 Octobre 2017 20:44:26 > Objet: Confirm bug in java.lang.reflec

Confirm bug in java.lang.reflect.Proxy wrt static methods in interfaces

2017-10-02 Thread Eric McCorkle
Hello everyone, A colleague of mine discovered what seems to be a bug in java.lang.reflect.Proxy#newProxyInstance. I'd like to confirm that this is indeed incorrect behavior before I go and fix it. Consider the following two interfaces: interface I1 { static I1 foo() { return null; } }