src/share/classes/com/sun/tools/javac/parser/JavacParser.java

Print this page

        

@@ -2912,11 +2912,13 @@
             return annotation(pos, Tag.ANNOTATION);
         case LBRACE:
             pos = token.pos;
             accept(LBRACE);
             ListBuffer<JCExpression> buf = new ListBuffer<JCExpression>();
-            if (token.kind != RBRACE) {
+            if (token.kind == COMMA) {
+                nextToken();
+            } else if (token.kind != RBRACE) {
                 buf.append(annotationValue());
                 while (token.kind == COMMA) {
                     nextToken();
                     if (token.kind == RBRACE) break;
                     buf.append(annotationValue());