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

Update Core Reflection for Type Annotations to match latest spec

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • core-libs
    • None
    • 8
    • 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 ...

      Attachments

        Issue Links

          Activity

            People

              jfranck Joel Borggrén-Franck (Inactive)
              jfranck Joel Borggrén-Franck (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: