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

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b96
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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> {
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: