From fb71e1bee37af989c7ff8d6df635b7ab3c5b5710 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 27 Nov 2009 11:45:37 +0100 Subject: This is a patch submitted by lahoda on the issue tracker (issue #61). It apparently makes lombok work on JDK7. Will need to verify it, but, awesome sleuthing work by lahoda! --- src/core/lombok/javac/JavacAST.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/JavacAST.java b/src/core/lombok/javac/JavacAST.java index 93e3f3dc..e231f1d8 100644 --- a/src/core/lombok/javac/JavacAST.java +++ b/src/core/lombok/javac/JavacAST.java @@ -33,6 +33,7 @@ import javax.tools.JavaFileObject; import lombok.core.AST; import com.sun.tools.javac.code.Symtab; +import com.sun.tools.javac.model.JavacElements; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.JCTree.JCAnnotation; @@ -56,7 +57,7 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; */ public class JavacAST extends AST { private final Messager messager; - private final Name.Table nameTable; + private final JavacElements elements; private final TreeMaker treeMaker; private final Symtab symtab; private final Log log; @@ -75,7 +76,7 @@ public class JavacAST extends AST { this.context = context; this.messager = messager; this.log = Log.instance(context); - this.nameTable = Name.Table.instance(context); + this.elements = JavacElements.instance(context); this.treeMaker = TreeMaker.instance(context); this.symtab = Symtab.instance(context); clearChanged(); @@ -120,7 +121,7 @@ public class JavacAST extends AST { /** @return A Name object generated for the proper name table belonging to this AST. */ public Name toName(String name) { - return nameTable.fromString(name); + return elements.getName(name); } /** @return A TreeMaker instance that you can use to create new AST nodes. */ -- cgit