aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMattias Grönlund <mattias@gronlund.se>2021-01-01 12:13:20 +0100
committerMattias Grönlund <mattias@gronlund.se>2021-01-01 12:38:07 +0100
commit01cc651540120947ae1081cea6434704e508574e (patch)
treeaf8a24c2f6a5250b65f6a13bc145b4f4e0d2ffac /src
parent67d66be9eccf050a5f3758273ea2d685217f6d5a (diff)
downloadlombok-01cc651540120947ae1081cea6434704e508574e.tar.gz
lombok-01cc651540120947ae1081cea6434704e508574e.tar.bz2
lombok-01cc651540120947ae1081cea6434704e508574e.zip
Do not lose generic arguments when adding annotations #2689
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/javac/handlers/JavacHandlerUtil.java4
1 files changed, 4 insertions, 0 deletions
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;
}