From 01cc651540120947ae1081cea6434704e508574e Mon Sep 17 00:00:00 2001 From: Mattias Grönlund Date: Fri, 1 Jan 2021 12:13:20 +0100 Subject: Do not lose generic arguments when adding annotations #2689 --- src/core/lombok/javac/handlers/JavacHandlerUtil.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index fbde9568..9b63a523 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -2170,6 +2170,10 @@ public class JavacHandlerUtil { JCExpression resType = mth.restype; if (resType instanceof JCTypeApply) { JCTypeApply ta = (JCTypeApply) resType; + if (ta.clazz instanceof JCFieldAccess) { + mth.restype = maker.TypeApply(maker.AnnotatedType(List.of(m), ta.clazz), ta.arguments); + return; + } resType = ta.clazz; } -- cgit