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

Type annotation placed on incorrect array nesting levels

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 23
    • 21, 22
    • tools
    • None

    Description

      Consider this code:

          import java.lang.annotation.*;
          
          public class ArrayAnno {
              @Retention(RetentionPolicy.RUNTIME)
              @Target(ElementType.TYPE_USE)
              @Documented
              public @interface Anno { int value(); }
          
              public void method(@Anno(1) int @Anno(2) [] @Anno(3) [] arg) {}
              public void method(@Anno(1) String @Anno(2) [] @Anno(3) [] arg) {}
          }


      Javadoc outputs @Anno(1) int @Anno(3) [] @Anno(2) [] arg, which is incorrect. The HtmlLinkFactory should fix the annotation placement on nested arrays.

      Attachments

        Issue Links

          Activity

            People

              liach Chen Liang
              liach Chen Liang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: