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

TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 23
    • tools
    • None
    • behavioral
    • low
    • May be changes to toString output etc.
    • Java API
    • Implementation

      Summary

      Fix the behavior of TypeMirror.{getAnnotationsByType, getAnnotation} in javac's implementation to return informative results.

      Problem

      The javac implementation of TypeMirror.{getAnnotationsByType, getAnnotation} always return a "not there" result and not a result consistent with the return value of getAnnotationMirrors(). The getAnnotationsByType and getAnnotation methods are convenience methods that should be consistent with the full result of getAnnotationMirrors().

      Solution

      Fix javacs implementation of these methods for TypeMirrors; the implementation on Elements is already correct.

      Specification

      No specification change.

            darcy Joe Darcy
            darcy Joe Darcy
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: