aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/lombok/eclipse/handlers/HandleBuilder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleBuilder.java b/src/core/lombok/eclipse/handlers/HandleBuilder.java
index 2ef888fe..ef06e249 100644
--- a/src/core/lombok/eclipse/handlers/HandleBuilder.java
+++ b/src/core/lombok/eclipse/handlers/HandleBuilder.java
@@ -251,7 +251,13 @@ public class HandleBuilder extends EclipseAnnotationHandler<Builder> {
TypeParameter[] tpOnType = ((TypeDeclaration) tdParent.get()).typeParameters;
TypeParameter[] tpOnMethod = md.typeParameters;
- TypeReference[][] tpOnRet_ = md.returnType.getTypeArguments();
+ TypeReference[][] tpOnRet_ = null;
+ if (md.returnType instanceof ParameterizedSingleTypeReference) {
+ tpOnRet_ = new TypeReference[1][];
+ tpOnRet_[0] = ((ParameterizedSingleTypeReference) md.returnType).typeArguments;
+ } else if (md.returnType instanceof ParameterizedQualifiedTypeReference) {
+ tpOnRet_ = ((ParameterizedQualifiedTypeReference) md.returnType).typeArguments;
+ }
if (tpOnRet_ != null) for (int i = 0; i < tpOnRet_.length - 1; i++) {
if (tpOnRet_[i] != null && tpOnRet_[i].length > 0) {