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

Type annotation is not shown for wildcard type in Javadoc

XMLWordPrintable

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

        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

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

                Created:
                Updated:
                Resolved: