Looks good. I think I would have avoided the nested ifs and just tested for instanceof TypeNotPresentExceptionProxy directly but no big deal.
cheers /Joel On Sat, Jun 11, 2016 at 11:30 PM, joe darcy <joe.da...@oracle.com> wrote: > Hello, > > Please review these changes to address > > JDK-5041778: (ann) AnnotationFormatError if "default" Class type not > found > http://cr.openjdk.java.net/~darcy/5041778.0/ > > The specification of Method.getDefaultValue states > > 631 * @throws TypeNotPresentException if the annotation is of type > 632 * {@link Class} and no definition can be found for the > 633 * default class value. > > However, the previous implementation threw an AnnotationFormatError in this > case instead. > > An implementation note, the code > > 647 if (result instanceof TypeNotPresentExceptionProxy) { > 648 TypeNotPresentExceptionProxy proxy = > (TypeNotPresentExceptionProxy)result; > 649 throw new TypeNotPresentException(proxy.typeName(), > proxy.getCause()); > 650 } > > could instead something like > > throw proxy.generateException(); > > on line 649, but the code in the webrev should yield a more informative > stack trace for the user. > > Thanks, > > -Joe >