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

Method.getAnnotations fails to find annotations under certain circumstances

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8
    • core-libs

      If Bar extends Foo, and Foo is package protected, then Method.getAnnotations() fails to find the annotations on public methods defined on Foo.
      However, it does work if you inspect the annotations on Foo directly. The combination of a sub-class, and package protected abstract parent class, causes the issue.

            aefimov Aleksej Efimov
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: