diff options
author | Roel Spilker <r.spilker@gmail.com> | 2015-01-21 02:07:56 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2015-01-21 02:07:56 +0100 |
commit | 7bb2ed02c3891d240840110abb0a79949947cc16 (patch) | |
tree | d8f3a6e1b088153ed65fd4f1c19f761d11e6571a /src/eclipseAgent/lombok | |
parent | 6f76123a571c69d4c2c533f1c6c2abdc080cd905 (diff) | |
download | lombok-7bb2ed02c3891d240840110abb0a79949947cc16.tar.gz lombok-7bb2ed02c3891d240840110abb0a79949947cc16.tar.bz2 lombok-7bb2ed02c3891d240840110abb0a79949947cc16.zip |
[i742][i747] Fix for ExtensionMethod broken in Eclipse using java8
Diffstat (limited to 'src/eclipseAgent/lombok')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java index 44adb333..ca0933fb 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java @@ -227,8 +227,11 @@ public class PatchExtensionMethod { if (argument.resolvedType != null) argumentTypes.add(argument.resolvedType); // TODO: Instead of just skipping nulls entirely, there is probably a 'unresolved type' placeholder. THAT is what we ought to be adding here! } + Expression[] originalArgs = methodCall.arguments; + methodCall.arguments = arguments.toArray(new Expression[0]); MethodBinding fixedBinding = scope.getMethod(extensionMethod.declaringClass, methodCall.selector, argumentTypes.toArray(new TypeBinding[0]), methodCall); if (fixedBinding instanceof ProblemMethodBinding) { + methodCall.arguments = originalArgs; if (fixedBinding.declaringClass != null) { scope.problemReporter().invalidMethod(methodCall, fixedBinding); } @@ -247,7 +250,6 @@ public class PatchExtensionMethod { arg.implicitConversion = TypeIds.UNBOXING | (id + (id << 4)); // magic see TypeIds } } - methodCall.arguments = arguments.toArray(new Expression[0]); methodCall.receiver = createNameRef(extensionMethod.declaringClass, methodCall); methodCall.actualReceiverType = extensionMethod.declaringClass; |