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

Clarify treatment of bounds in j.l.r.Annotated{WildcardType,TypeVariable}

    XMLWordPrintable

    Details

      Backports

        Description

        // Item #1 is a spec change that requires a corresponding implementation change.
        // Items #2 and #3 are spec changes only, to align with the behavior already exhibited by JDK 8.

        1) AnnotatedWildcardType.getAnnotated*Bounds() should mimic WildcardType.get*Bounds()

        - AnnotatedType[] getAnnotatedLowerBounds(): Returns the potentially annotated lower bounds of this wildcard type. _Note that if no lower bound is explicitly declared, the lower bound is the type of null. In this case, a zero length array is returned._

        - AnnotatedType[] getAnnotatedUpperBounds(): Returns the potentially annotated upper bounds of this wildcard type. _Note that if no upper bound is explicitly declared, the upper bound is Object._

        2) AnnotatedTypeVariable.getAnnotatedBounds() should mimic TypeVariable.getBounds()

        AnnotatedType[] getAnnotatedBounds(): Returns the potentially annotated bounds of this type variable. _Note that if no bound is explicitly declared, the bound is Object._

        3) TypeVariable.getAnnotatedBounds() should mimic TypeVariable.getBounds()

        AnnotatedType[] getAnnotatedBounds(): Returns an array of AnnotatedType objects that represent the use of types to denote the upper bounds of the type parameter represented by this TypeVariable. The order of the objects in the array corresponds to the order of the bounds in the declaration of the type parameter. _Note that if no upper bound is explicitly declared, the upper bound is Object._

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sadayapalam Srikanth Adayapalam
                Reporter:
                abuckley Alex Buckley
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: