Separate compilation breaks check that elements have a default for the containing annotation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • None
    • b61
    • generic
    • generic
    • Verified

      Separate compilation breaks the check that all non-value elements for the containing annotation has a default.

      Compiling this first:

      import java.lang.annotation.ContainedBy;
      import java.lang.annotation.ContainerFor;

      public class ClassReaderDefault {
      }

      @ContainerFor(Foo.class)
      @interface FooContainer {
           Foo[] value();
           int f() default 0;
      }

      @ContainedBy(FooContainer.class)
      @interface Foo {}

      And then in a second file:

      @Foo @Foo
      public class SeparateCompile {
      }

      Results in an error for the second compilation.

            Assignee:
            Joel Borggrén-Franck (Inactive)
            Reporter:
            Joel Borggrén-Franck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: