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

Type annotation placed on incorrect array nesting levels

XMLWordPrintable

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

      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.

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

              Created:
              Updated:
              Resolved: