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

Clarify that WildcardType and AnnotatedWildcardType bounds methods return one

XMLWordPrintable

    • b10
    • generic
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      The java.lang.reflect.WildcardType methods getLowerBounds() and getUpperBounds() as well as the java.lang.reflect.AnnotatedWildcardType methods getAnnotatedLowerBounds() and getAnnotatedUpperBounds() return arrays and their documentation as well as the interface documentation is talking about "bound(s)".
      However, the JLS does not permit mulitple bounds (not sure if the JVMS does, though based on sun.reflect.generics.parser.SignatureParser.parseTypeArgument() it does not look like it). It would therefore be good to clarify the documentation stating that currently at most 1 bound is returned. In their current state these methods are rather irritating.


            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: