Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
None
-
b112
-
Verified
Description
1) Javadoc and implementation of j.l.reflect.AnnotatedType and friends needs to be updated and clarified with regard to returned values and null
In general:
- If the Type or Type[] returning methods (getGeneric*, get*Bounds, etc) does not return 'null', the version returning an AnnotatedType (getAnnotated*, getAnnotated*Bounds etc) should not return 'null'.
- There should be a preference for returning "empty" AnnotatedType instances and 0-length AnnotatedType arrays.
2) Additional clarifications in the javadoc may be needed to match the latest spec, such as saying in the interface-level javadoc that:
- AnnotatedType represents the _potentially annotated_use of ...
- AnnotatedArrayType represents the _potentially annotated_ use of ...
- AnnotatedParameterizedType represents the _potentially annotated_ use of ...
- AnnotatedTypeVariable represents the _potentially annotated_ use of ...
- AnnotatedWildcardType represents the _potentially annotated_ use of ...
In general:
- If the Type or Type[] returning methods (getGeneric*, get*Bounds, etc) does not return 'null', the version returning an AnnotatedType (getAnnotated*, getAnnotated*Bounds etc) should not return 'null'.
- There should be a preference for returning "empty" AnnotatedType instances and 0-length AnnotatedType arrays.
2) Additional clarifications in the javadoc may be needed to match the latest spec, such as saying in the interface-level javadoc that:
- AnnotatedType represents the _potentially annotated_use of ...
- AnnotatedArrayType represents the _potentially annotated_ use of ...
- AnnotatedParameterizedType represents the _potentially annotated_ use of ...
- AnnotatedTypeVariable represents the _potentially annotated_ use of ...
- AnnotatedWildcardType represents the _potentially annotated_ use of ...
Attachments
Issue Links
- is cloned by
-
JDK-8023471 Add compatibility note to AnnotatedElement
- Resolved
- relates to
-
JDK-8024915 j.l.r.Executable.getAnnotatedReceiverType() should return null for static methods
- Closed
-
JDK-8004698 Implement Core Reflection for Type Annotations
- Closed