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

Unbounded wildcard '?' means '? extends Object'

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 8
    • 6
    • specification
    • None
    • generic
    • generic
    • Verified

      The introduction of the capture conversion simplified a lot of things. One of the things it did is make "?" equivalent to "? extends Object". Unfortunately, JLS3 doesn't say they are equivalent. It should because, for example, 4.5.1.1, which describes type argument containment, does not address the unbounded wildcard case. Similarly, the definition of Icta on page 465 seems to be missing a case for an unbounded wildcard. I expect there are others.

            abuckley Alex Buckley
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: