From 23ba6c2628f893678924d66382f962557514f66b Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 1 Jul 2009 00:26:19 +0200 Subject: Added HandleCleanup support for javac, and fixed a bug in AST.java which caused nested @Cleanup annotations to simply be ignored (rebuild was broken). HandleCleanup seems to work swimmingly now on both targets. yay! --- src/lombok/eclipse/handlers/HandleCleanup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lombok/eclipse/handlers') diff --git a/src/lombok/eclipse/handlers/HandleCleanup.java b/src/lombok/eclipse/handlers/HandleCleanup.java index 867bd0e5..a28c6c6a 100644 --- a/src/lombok/eclipse/handlers/HandleCleanup.java +++ b/src/lombok/eclipse/handlers/HandleCleanup.java @@ -36,7 +36,7 @@ public class HandleCleanup implements EclipseAnnotationHandler { LocalDeclaration decl = (LocalDeclaration)annotationNode.up().get(); Node ancestor = annotationNode.up().directUp(); - ASTNode blockNode = annotationNode.up().directUp().get(); + ASTNode blockNode = ancestor.get(); final boolean isSwitch; final Statement[] statements; @@ -69,7 +69,7 @@ public class HandleCleanup implements EclipseAnnotationHandler { return true; } - start++; + start++; //We start with try{} *AFTER* the var declaration. int end; if ( isSwitch ) { -- cgit