Review request JDK-8004729: Parameter Reflection API

Paul Sandoz paul.sandoz at oracle.com
Thu Jan 10 09:13:28 UTC 2013


Hi Eric,

In Parameter.java:

--

  31 public final class Parameter implements AnnotatedElement {
  32 
  33     private String name;
  34     private int modifiers;
  35     private Executable executable;
  36     private int index;
  37 

Can all the above fields be marked as final?

--

 172     public <T extends Annotation> T getDeclaredAnnotation(Class<T> annotationClass) {
 173         if (annotationClass == null)
 174             throw new NullPointerException();

Objects.requireNonNull(annotationClass);

--

 179     public <T extends Annotation> T getDeclaredAnnotations(Class<T> annotationClass) {

 202     public <T extends Annotation> T getAnnotations(Class<T> annotationClass) {

Should return T[] i presume. Likewise the spec needs to be updated on page 25.

Paul.

On Jan 9, 2013, at 10:55 PM, Eric McCorkle <eric.mccorkle at oracle.com> wrote:

> Hello,
> 
> Please review the core reflection API implementation of parameter
> reflection.  This is the final component of method parameter reflection.
> This was posted for review before, then delayed until the check-in for
> JDK-8004728 (hotspot support for parameter reflection), which occurred
> yesterday.
> 
> Note: The check-in of JDK-8004728 was into hsx/hotspot-rt, *not*
> jdk8/tl; therefore, it may be a while before the changeset makes its way
> into jdk8/tl.
> 
> Also note: since the check-in of JDK-8004727 (javac support for
> parameter reflection), there has been a failure in the tests for
> Pack200.  This is being addressed in a fix contributed by Kumar, which I
> believe has also been posted for review.
> 
> The open webrev is here:
> http://cr.openjdk.java.net/~coleenp/JDK-8004729
> 
> The feature request is here:
> http://bugs.sun.com/view_bug.do?bug_id=8004729
> 
> The latest version of the spec can be found here:
> http://cr.openjdk.java.net/~abuckley/8misc.pdf
> 
> 
> Thanks,
> Eric




More information about the core-libs-dev mailing list