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

Repeating annotations - getAnnotationsByType(Class<T>) is not working as expected for few inheritance scenarios

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • 8
    • core-libs
    • 8
    • b115
    • Verified

      getAnnotations(Class<T>), now renamed to getAnnotationsByType(Class<T>) is not working as expected for following 4 test scenarios:

      1. SingleAnnoOnSuperContainerOnSub.java - @Foo on super class, @FooContainer(@Foo, @Foo) on sub class
      2. ContainerOnSuperSingleOnSub.java - @FooContainer(@Foo, @Foo) on super class, @Foo on sub class
      3. SingleOnSuperRepeatableOnSub.java - @Foo on super class, @Foo, @Foo on sub class
      4. RepeatableOnSuperSingleOnSub.java - @Foo @Foo on super class, @Foo on sub class

      In all the above cases, @ContainedBy/@ContainerFor relationship is defined.
      Test src attached for all 4 cases.

            alundblad Andreas Lundblad (Inactive)
            sogoel Sonali Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: