src/share/classes/sun/reflect/annotation/TypeAnnotationParser.java
Print this page
@@ -126,18 +126,22 @@
}
}
for (int i = 0; i < size; i++) {
@SuppressWarnings("unchecked")
ArrayList<TypeAnnotation> list = l[i];
+ TypeAnnotation[] typeAnnotations;
if (list != null) {
- TypeAnnotation[] typeAnnotations = list.toArray(new TypeAnnotation[0]);
+ typeAnnotations = list.toArray(new TypeAnnotation[0]);
+ } else {
+ typeAnnotations = new TypeAnnotation[0];
+ }
result[i] = AnnotatedTypeFactory.buildAnnotatedType(types[i],
LocationInfo.BASE_LOCATION,
typeAnnotations,
typeAnnotations,
decl);
- }
+
}
return result;
}
// Class helpers