aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/eclipse/handlers
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-08-18 23:43:17 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-08-18 23:43:17 +0200
commit07f7afe626a2f76d7c5776e0cd97b131107638be (patch)
tree7dcf205eb04727fbb9675db9c9d1d5972565a661 /src/core/lombok/eclipse/handlers
parent1dcbc161c403f62eed87603ce79f8bf2f266b778 (diff)
downloadlombok-07f7afe626a2f76d7c5776e0cd97b131107638be.tar.gz
lombok-07f7afe626a2f76d7c5776e0cd97b131107638be.tar.bz2
lombok-07f7afe626a2f76d7c5776e0cd97b131107638be.zip
Bugfix in eclipse handler for toBuilder(); using a method that older versions of eclipse don’t have yet.
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-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) {