Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-10-22 Thread Joe Darcy
Looks fine Joel; thanks, -Joe On 10/21/2013 04:12 AM, Joel Borggrén-Franck wrote: Hi All, http://cr.openjdk.java.net/~jfranck/8009411/webrev.03/ New webrev including the test originally contributed by Peter (I noticed the commit doesn't include Peter in contributed by, I have fixed that in

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-10-21 Thread Joel Borggrén-Franck
Hi All, http://cr.openjdk.java.net/~jfranck/8009411/webrev.03/ New webrev including the test originally contributed by Peter (I noticed the commit doesn't include Peter in contributed by, I have fixed that in my local copy). Static methods on implemented interfaces are now ignored in the

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Peter Levart
On 09/12/2013 03:37 PM, Joel Borggrén-Franck wrote: Hi again, New webrev: http://cr.openjdk.java.net/~jfranck/8009411/webrev.01/ Thanks to Remi and Peter for the quick feedback, I've updated the code to use for-each as well as fixing getMethod(...). Andreas Lundblad also added ~100 testcases

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Peter Levart
On 09/13/2013 12:18 PM, Peter Levart wrote: The C.class.getMethods() returns a 1 element array containing A.m(), but C.class.getMethod(m) throws NoSuchMethodException. This seems inconsistent, but it's a corner case that can only happen with separate compilation. Sorry Joel, I must have

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Joel Borggrén-Franck
Hi Peter, Interesting case, thanks for the testing. On Sep 13, 2013, at 1:15 PM, Peter Levart peter.lev...@gmail.com wrote: On 09/13/2013 12:18 PM, Peter Levart wrote: The C.class.getMethods() returns a 1 element array containing A.m(), but C.class.getMethod(m) throws NoSuchMethodException.

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Peter Levart
On 09/13/2013 02:55 PM, Joel Borggrén-Franck wrote: Hi Peter, Interesting case, thanks for the testing. On Sep 13, 2013, at 1:15 PM, Peter Levart peter.lev...@gmail.com wrote: On 09/13/2013 12:18 PM, Peter Levart wrote: The C.class.getMethods() returns a 1 element array containing A.m(),

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Joel Borggrén-Franck
On Sep 13, 2013, at 3:18 PM, Peter Levart peter.lev...@gmail.com wrote: On 09/13/2013 02:55 PM, Joel Borggrén-Franck wrote: Hi Peter, Interesting case, thanks for the testing. On Sep 13, 2013, at 1:15 PM, Peter Levart peter.lev...@gmail.com wrote: On 09/13/2013 12:18 PM, Peter Levart

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-13 Thread Peter Levart
On 09/13/2013 03:38 PM, Joel Borggrén-Franck wrote: I fully agree this will most probably occur in practice. But the situation is more complicated for an invoke, since there must have been a A.m() present when C was compiled in order to have an invokeinterface to be there in the first place.

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-12 Thread Joel Borggrén-Franck
Hi again, New webrev: http://cr.openjdk.java.net/~jfranck/8009411/webrev.01/ Thanks to Remi and Peter for the quick feedback, I've updated the code to use for-each as well as fixing getMethod(...). Andreas Lundblad also added ~100 testcases for getMethod(), both positive and negative. Please

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-11 Thread Joel Borggren-Franck
On 2013-09-09, Remi Forax wrote: On 09/09/2013 07:27 PM, Joel Borggrén-Franck wrote: On 9 sep 2013, at 19:00, Joel Borggrén-Franck joel.fra...@oracle.com wrote: The issue is that since we added static methods to interfaces those have erroneously been reflected in getMethods of implementing

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-09 Thread Peter Levart
Hi Joel, The fix is ok for getMethods(), but I think the getMethod(String name, Class?... parameterTypes) should also be fixed. Currently the following code: public class StaticInterfaceMethodTest { public interface A { static void m() {} } public interface B extends A {

RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-09 Thread Joel Borggrén-Franck
Hi Pleaser review fix for 8009411 : getMethods should not inherit static methods from interfaces The issue is that since we added static methods to interfaces those have erroneously been reflected in getMethods of implementing classes. This fix filters out static interface methods from

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-09 Thread Joel Borggrén-Franck
Hi Peter, You are correct, thanks for noticing this. Also after reading your mail I looked through the test in test/java/lang/refledt/DefaultStaticTest/ and just realized the tests doesn't cover getMethod() at all. So this change needs more tests as well. I'll post a new webrev later this

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-09 Thread Joel Borggrén-Franck
On 9 sep 2013, at 19:00, Joel Borggrén-Franck joel.fra...@oracle.com wrote: The issue is that since we added static methods to interfaces those have erroneously been reflected in getMethods of implementing classes. This fix filters out static interface methods from superinterfaces when

Re: RFR: 8009411 : getMethods should not inherit static methods from interfaces

2013-09-09 Thread Remi Forax
On 09/09/2013 07:27 PM, Joel Borggrén-Franck wrote: On 9 sep 2013, at 19:00, Joel Borggrén-Franck joel.fra...@oracle.com wrote: The issue is that since we added static methods to interfaces those have erroneously been reflected in getMethods of implementing classes. This fix filters out