eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
157 stars 124 forks source link

Bug 549025 - [1.8][spec] equivalence of "?" vs. "? extends Object" #2857

Open stephan-herrmann opened 3 weeks ago

stephan-herrmann commented 3 weeks ago

From https://bugs.eclipse.org/549025

We had discussed the significance of "extends Object" in a wildcard before. Only today I found https://bugs.openjdk.java.net/browse/JDK-6480391 which had been resolved for 8.

Note that it says "? extends Object" is an unbounded wildcard ...

and

The following sentence can indeed by found in JLS §4.5.1 since version 8:

  • The wildcard ? extends Object is equivalent to the unbounded wildcard ?.