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

Clarify that WildcardType and AnnotatedWildcardType bounds methods return one

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P4
    • Resolution: Fixed
    • 14
    • 16
    • core-libs
    • b10
    • generic
    • Verified

    Description

      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.


      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: