aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Eichhorn <peichhor@web.de>2012-06-24 21:12:05 +0200
committerPhilipp Eichhorn <peichhor@web.de>2012-06-24 21:12:05 +0200
commit073f325d714e4f9a3c14d723a08d0055ad02f580 (patch)
tree64fae43c0e3f8100e4f4bfb78c418b5ca8b88132
parent8fb4f79757547378c7d8c29759d04037bdd47c7e (diff)
downloadlombok-073f325d714e4f9a3c14d723a08d0055ad02f580.tar.gz
lombok-073f325d714e4f9a3c14d723a08d0055ad02f580.tar.bz2
lombok-073f325d714e4f9a3c14d723a08d0055ad02f580.zip
ExtensionMethod didn't work for primitive types in eclipse..
this has been fixed
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java
index 36d884b9..ebfb1a05 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchExtensionMethod.java
@@ -198,8 +198,6 @@ public class PatchExtensionMethod {
}
}
- if (methodCall.binding == null) return resolvedType;
-
for (Extension extension : extensions) {
if (!extension.suppressBaseMethods && !(methodCall.binding instanceof ProblemMethodBinding)) continue;
for (MethodBinding extensionMethod : extension.extensionMethods) {
@@ -212,8 +210,9 @@ public class PatchExtensionMethod {
arguments.add(methodCall.receiver);
if (methodCall.arguments != null) arguments.addAll(Arrays.asList(methodCall.arguments));
List<TypeBinding> argumentTypes = new ArrayList<TypeBinding>();
- argumentTypes.add(methodCall.receiver.resolvedType);
- if (methodCall.binding.parameters != null) argumentTypes.addAll(Arrays.asList(methodCall.binding.parameters));
+ for (Expression argument : arguments) {
+ argumentTypes.add(argument.resolvedType);
+ }
MethodBinding fixedBinding = scope.getMethod(extensionMethod.declaringClass, methodCall.selector, argumentTypes.toArray(new TypeBinding[0]), methodCall);
if (fixedBinding instanceof ProblemMethodBinding) {
if (fixedBinding.declaringClass != null) {