Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8021398

j.l.r.Parameter.getAnnotatedType().getType() for not annotated use of type returns null

    XMLWordPrintable

Details

    Description

      JCK tests will fail due to this issue: j.l.r.Parameter.getAnnotatedType().getType() for not annotated use of type returns null.

      From the API doc for j.l.r.Parameter.getAnnotatedType(): "Returns an AnnotatedType object that represents the use of a type to specify the type of the formal parameter represented by this Parameter."

      Tested with jdk8b100.


      Minimized test:
      ----------------------------------------

      public class Test {

          public void meth(Object param) {}

          public static void main(String[] args) throws NoSuchMethodException {
              System.out.println(Data.class.getMethod("meth", Object.class).getParameters()[0].getAnnotatedType().getType());
          }
      }
      ----------------------------------------

      Output:
      ----------------------------------------

      null
      ----------------------------------------

      Attachments

        Activity

          People

            emc Eric Mccorkle
            evotchen Elena Votchennikova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: