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

getBounds() returns the list with one TypeMirror representing java.lang.Object

XMLWordPrintable

    • b96
    • generic
    • generic
    • Verified

      The spec for the method getBounds() of javax.lang.model.element.TypeParameterElement says:

      ---
      List<? extends TypeMirror> getBounds()
          Returns the bounds of this type parameter. These are the types given by the extends clause used to declare this type parameter. *If no explicit extends clause was used, an empty list is returned.*
          Returns:
              the bounds of this type parameter, or an empty list if there are none
      ---

        However, for each of {TP1,TP2,TP3,TP4} in this source the list with one TypeMirror representing java.lang.Object is returned:

      public class S_TPE0002<TP1> extends TestSource {
          public <TP2> S_TPE0002(TP2 param) {}
          public <TP3> TP3 loopback(TP3 param) {
              return param;
          }
      }

      interface I_TPE0002_1<TP4> {
      }

            sseligmasunw Scott Seligman (Inactive)
            ashusher Alexander Shusherov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: