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

javadoc makes up type variables for grandparent types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 9
    • tools
    • None

      An interface or class that (a) possesses a type parameter and (b) indirectly inherits from another interface with a type parameter may wind up passing that type parameter incorrectly to its indirect super, in the javadoc account of "All Superinterfaces". The JLS does not allow type parameters to skip generations of super types in this way.

      $ cat > Foo.java <<_EOF
      import java.util.List;

      public interface Foo {
          interface DumbList extends List<Object> { }
          interface ThingySupplierWithDumbList<T> extends DumbList {
              T getThingy();
          }
      }
      _EOF
      $ javadoc Foo.java
      $ grep '<dd>.*Collection' < Foo.ThingySupplierWithDumbList.html
      <dd><code>java.util.Collection&lt;T&gt;</code>, ...



            ksrini Kumar Srinivasan
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: