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

Clarify that WildcardType and AnnotatedWildcardType bounds methods return one

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 16
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b10
    • OS:
      generic
    • Verification:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: