From 6a42bccb9730b7072b1219a03642074ab96fbe61 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 10 Sep 2018 22:24:06 +0200 Subject: toBuilder() with singular should force the typeargs on the Collections.emptyList call. --- src/core/lombok/eclipse/handlers/HandleBuilder.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/lombok') diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java index 9a069c58..4d20f052 100644 --- a/src/core/lombok/eclipse/handlers/HandleBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java @@ -541,6 +541,7 @@ public class HandleBuilder extends EclipseAnnotationHandler { MessageSend emptyList = new MessageSend(); emptyList.receiver = generateQualifiedNameRef(source, TypeConstants.JAVA, TypeConstants.UTIL, "Collections".toCharArray()); emptyList.selector = EMPTY_LIST; + emptyList.typeArguments = copyTypes(bfd.singularData.getTypeArgs().toArray(new TypeReference[0])); ms.arguments = new Expression[] {new ConditionalExpression(ifNull, emptyList, tgt[1])}; } ms.receiver = receiver; -- cgit