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

Type annotation is not shown for wildcard type in Javadoc

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 15
    • 11, 13, 15
    • tools

    Backports

      Description

        Code:

        // Wildcard.java
        import java.lang.annotation.*;

        public class Wildcard<T> {
          public Wildcard<@Anno ? super String> x() {return null;}

          @Documented
          @Target(ElementType.TYPE_USE)
          public @interface Anno {}
        }

        javadoc Wildcard.java yields the following method signature:

        public Wildcard<? super java.lang.String> x()

        It's expected to have

        public Wildcard<@Anno ? super java.lang.String> x()

        Tried with java 11, java 13 and java 15-ea

        Attachments

          Issue Links

            Activity

              People

                hannesw Hannes Wallnoefer
                tvaleev Tagir Valeev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: