diff options
author | Roel Spilker <r.spilker@gmail.com> | 2012-03-27 00:00:14 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2012-03-27 00:02:13 +0200 |
commit | dbe96eb74a8b0304bafcc72ae9a952e722d32912 (patch) | |
tree | a2a313d5a8e687b479c101be202e1e03c3a76f26 /src/core/lombok/javac/handlers/JavacHandlerUtil.java | |
parent | 693bf6678f5633c6c9db296dd60988211950ff4a (diff) | |
download | lombok-dbe96eb74a8b0304bafcc72ae9a952e722d32912.tar.gz lombok-dbe96eb74a8b0304bafcc72ae9a952e722d32912.tar.bz2 lombok-dbe96eb74a8b0304bafcc72ae9a952e722d32912.zip |
Fixes issue 326: In NetBeans, the generated default constructor was compiled into the classfile, even when lombok generated constructors.
Diffstat (limited to 'src/core/lombok/javac/handlers/JavacHandlerUtil.java')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index 32b17322..a6b33308 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -36,20 +36,16 @@ import java.util.regex.Pattern; import lombok.AccessLevel; import lombok.Data; import lombok.Getter; -import lombok.core.AnnotationValues; -import lombok.core.TypeResolver; import lombok.core.AST.Kind; +import lombok.core.AnnotationValues; import lombok.core.AnnotationValues.AnnotationValue; +import lombok.core.TypeResolver; import lombok.javac.Javac; import lombok.javac.JavacNode; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.TypeTags; import com.sun.tools.javac.tree.JCTree; -import com.sun.tools.javac.tree.TreeScanner; -import com.sun.tools.javac.tree.JCTree.JCLiteral; -import com.sun.tools.javac.tree.JCTree.JCModifiers; -import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.JCTree.JCAnnotation; import com.sun.tools.javac.tree.JCTree.JCAssign; import com.sun.tools.javac.tree.JCTree.JCClassDecl; @@ -57,15 +53,19 @@ import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; import com.sun.tools.javac.tree.JCTree.JCExpression; import com.sun.tools.javac.tree.JCTree.JCIdent; import com.sun.tools.javac.tree.JCTree.JCImport; +import com.sun.tools.javac.tree.JCTree.JCLiteral; import com.sun.tools.javac.tree.JCTree.JCMethodDecl; import com.sun.tools.javac.tree.JCTree.JCMethodInvocation; +import com.sun.tools.javac.tree.JCTree.JCModifiers; import com.sun.tools.javac.tree.JCTree.JCNewArray; import com.sun.tools.javac.tree.JCTree.JCStatement; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; +import com.sun.tools.javac.tree.TreeMaker; +import com.sun.tools.javac.tree.TreeScanner; +import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Name; -import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; /** * Container for static utility methods useful to handlers written for javac. @@ -589,6 +589,9 @@ public class JavacHandlerUtil { JavacNode tossMe = typeNode.getNodeFor(def); if (tossMe != null) tossMe.up().removeChild(tossMe); type.defs = addAllButOne(type.defs, idx); + if (type.sym != null && type.sym.members_field != null) { + type.sym.members_field.remove(((JCMethodDecl)def).sym); + } break; } } |