javadoc makes up type variables for grandparent types

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: 9
    • Component/s: 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>, ...



            Assignee:
            Kumar Srinivasan
            Reporter:
            John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: