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.
- csr of
-
JDK-8323684 TypeMirror.{getAnnotationsByType, getAnnotation} return uninformative results
-
- Resolved
-