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

Type annotation is not shown for wildcard type in Javadoc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11, 13, 15
    • Fix Version/s: 15
    • Component/s: tools
    • Labels:

      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: