Handle null annotation array correctly.

This commit is contained in:
Werner Dietl authored and Reinier Zwitserloot committed 2018-09-11 01:59:19 +02:00
1 parent c3f34a8447
commit 65fc9897b3
1 file changed
+1 -1
@@ -774,7 +774,7 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
String setterName = fluent ? fieldNode.getName() : HandlerUtil.buildAccessorName("set", fieldNode.getName());
MethodDeclaration setter = HandleSetter.createSetter(td, deprecate, fieldNode, setterName, nameOfSetFlag, chain, ClassFileConstants.AccPublic,
sourceNode, Collections.<Annotation>emptyList(), Arrays.asList(annotations));
sourceNode, Collections.<Annotation>emptyList(), annotations != null ? Arrays.asList(annotations) : Collections.<Annotation>emptyList());
injectMethod(builderType, setter);
}