RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-16 Thread Joel Borggren-Franck
Hi Please review this small fix for a type annotation reflection issue. The javadoc spec for Class.getAnnotatedSuperclass says: * If this Class represents either the Object class, an interface type, an * array type, a primitive type, or void, the return value is null. The patch fixes this.

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-16 Thread Vicente-Arturo Romero-Zaldivar
It looks OK for me, Vicente On 16/08/13 13:17, Joel Borggren-Franck wrote: Hi Please review this small fix for a type annotation reflection issue. The javadoc spec for Class.getAnnotatedSuperclass says: * If this Class represents either the Object class, an interface type, an * array typ

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-19 Thread Paul Sandoz
Hi Joel, The fix looks OK. Not suggesting you do the following, unless you really want to, but the test is an example of where TestNG data providers are useful, since all cases will be tested and reported for pass or failure, rather than in this case the first failure will cause other checks (

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-19 Thread Joe Darcy
Hi Joel, I agree the code looks fine. However, I concur with the general sentiment of Paul test advice without advocating using testng for this task. A loop over a Class[] initialized with the kinds of values of interest would seem to be better structured to me and allow for better exceptio

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-21 Thread Joel Borggrén-Franck
Hi Joe, Paul I rewrote the test in Paul's style without using testNG. http://cr.openjdk.java.net/~jfranck/8022343/webrev.01/ Please review. cheers /Joel On 2013-08-19, Joe Darcy wrote: > Hi Joel, > > I agree the code looks fine. > > However, I concur with the general sentiment of Paul test a

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-22 Thread Joseph Darcy
Hi Joel, The new version is better, but for the testing in question I would prefer to see something even simpler like: public static void main(String[] args) throws Exception { int failed = 0; Class[] testData = {/* list of class literals*/} for (Class toTest: testD

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-23 Thread Joel Borggrén-Franck
Fixed, http://cr.openjdk.java.net/~jfranck/8022343/webrev.02/ cheers /Joel On Aug 23, 2013, at 2:34 AM, Joseph Darcy wrote: > Hi Joel, > > The new version is better, but for the testing in question I would prefer to > see something even simpler like: > >public static void main(String[]

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-23 Thread Joe Darcy
Looks good to go back; thanks, -Joe On 08/23/2013 09:54 AM, Joel Borggrén-Franck wrote: Fixed, http://cr.openjdk.java.net/~jfranck/8022343/webrev.02/ cheers /Joel On Aug 23, 2013, at 2:34 AM, Joseph Darcy wrote: Hi Joel, The new version is better, but for the testing in question I would

Re: RFR: 8022343: j.l.Class.getAnnotatedSuperclass() doesn't return null in some cases

2013-08-26 Thread Joel Borggrén-Franck
Joe, Paul, Vicente, Thanks for the reviews! cheers /Joel On 16 aug 2013, at 14:17, Joel Borggren-Franck wrote: > Hi > > Please review this small fix for a type annotation reflection issue. > > The javadoc spec for Class.getAnnotatedSuperclass says: > > * If this Class represents either the