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

Javac should recognize a constant string in annotations on a nested static class

XMLWordPrintable

      The following should compie:

      @interface Annot {
          String str();
      }

      public class Test {
          final String CONST_STR="something";

          @Annot( str = CONST_STR )
          static class Foo {}

          @Annot( str = CONST_STR )
          static void f(){}
      }

            nbenalla Nizar Benalla
            jfranck Joel Borggrén-Franck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: