diff options
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleSynchronized.java')
-rw-r--r-- | src/core/lombok/javac/handlers/HandleSynchronized.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/lombok/javac/handlers/HandleSynchronized.java b/src/core/lombok/javac/handlers/HandleSynchronized.java index b6f1e47f..f7ac50e7 100644 --- a/src/core/lombok/javac/handlers/HandleSynchronized.java +++ b/src/core/lombok/javac/handlers/HandleSynchronized.java @@ -46,7 +46,6 @@ import com.sun.tools.javac.tree.JCTree.JCNewArray; import com.sun.tools.javac.tree.JCTree.JCStatement; import com.sun.tools.javac.tree.JCTree.JCTypeParameter; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; -import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.List; /** @@ -87,7 +86,6 @@ public class HandleSynchronized extends JavacAnnotationHandler<Synchronized> { } JavacTreeMaker maker = methodNode.getTreeMaker().at(ast.pos); - Context context = methodNode.getContext(); JavacNode typeNode = upToTypeNode(annotationNode); @@ -120,7 +118,7 @@ public class HandleSynchronized extends JavacAnnotationHandler<Synchronized> { List.<JCExpression>of(maker.Literal(CTC_INT, 0)), null); JCVariableDecl fieldDecl = recursiveSetGeneratedBy(maker.VarDef( maker.Modifiers(Flags.PRIVATE | Flags.FINAL | (isStatic[0] ? Flags.STATIC : 0)), - methodNode.toName(lockName), objectType, newObjectArray), ast, context); + methodNode.toName(lockName), objectType, newObjectArray), annotationNode); injectFieldAndMarkGenerated(methodNode.up(), fieldDecl); } @@ -133,8 +131,8 @@ public class HandleSynchronized extends JavacAnnotationHandler<Synchronized> { lockNode = maker.Select(maker.Ident(methodNode.toName("this")), methodNode.toName(lockName)); } - recursiveSetGeneratedBy(lockNode, ast, context); - method.body = setGeneratedBy(maker.Block(0, List.<JCStatement>of(setGeneratedBy(maker.Synchronized(lockNode, method.body), ast, context))), ast, context); + recursiveSetGeneratedBy(lockNode, annotationNode); + method.body = setGeneratedBy(maker.Block(0, List.<JCStatement>of(setGeneratedBy(maker.Synchronized(lockNode, method.body), annotationNode))), annotationNode); methodNode.rebuild(); } |