src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java
changeset 5961 740e1ee04027
parent 5754 17c07ac3d164
child 5963 9cc61f487a6d
     1.1 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Feb 23 09:58:22 2017 +0100
     1.2 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Fri Sep 01 15:28:56 2017 +0200
     1.3 @@ -648,10 +648,12 @@
     1.4              log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
     1.5          }
     1.6          ListBuffer<Attribute> buf = new ListBuffer<>();
     1.7 -        for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
     1.8 -            buf.append(attributeAnnotationValue(types.elemtype(expectedElementType),
     1.9 -                    l.head,
    1.10 -                    env));
    1.11 +        if (na.elems != null) {
    1.12 +            for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
    1.13 +                buf.append(attributeAnnotationValue(types.elemtype(expectedElementType),
    1.14 +                        l.head,
    1.15 +                        env));
    1.16 +            }
    1.17          }
    1.18          na.type = expectedElementType;
    1.19          return new Attribute.