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

javadoc makes up type variables for grandparent types

    XMLWordPrintable

Details

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

    Description

      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>, ...



      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: