Skip to content

Commit

Permalink
Fixed issue 399: @ExtensionMethod broken for javac in nearly all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
peichhorn committed Jul 13, 2012
1 parent 0244679 commit 0682634
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/lombok/javac/handlers/HandleExtensionMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
import com.sun.tools.javac.tree.JCTree.JCIdent;
import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
import com.sun.tools.javac.tree.TreeMaker;

/**
* Handles the {@link ExtensionMethod} annotation for javac.
Expand Down Expand Up @@ -180,10 +179,7 @@ private void handleMethodCall(final JCMethodInvocation methodCall) {
Type firstArgType = types.erasure(extensionMethodType.asMethodType().argtypes.get(0));
if (!types.isAssignable(receiverType, firstArgType)) continue;
methodCall.args = methodCall.args.prepend(receiver);

TreeMaker maker = annotationNode.getTreeMaker();
JCIdent extensionClassIdent = maker.Ident(annotationNode.toName(extensionProvider.toString()));
methodCall.meth = maker.Select(extensionClassIdent, annotationNode.toName(methodName));
methodCall.meth = chainDotsString(annotationNode, extensionProvider.toString() + "." + methodName);
return;
}
}
Expand Down

0 comments on commit 0682634

Please sign in to comment.