diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-01 00:26:19 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-01 00:26:19 +0200 |
commit | 23ba6c2628f893678924d66382f962557514f66b (patch) | |
tree | 9a86da68896a4479584720ed2834c06c136c1a69 /src/lombok/eclipse/handlers | |
parent | 008bca204568d4af8ae67d815bbff017aad65dae (diff) | |
download | lombok-23ba6c2628f893678924d66382f962557514f66b.tar.gz lombok-23ba6c2628f893678924d66382f962557514f66b.tar.bz2 lombok-23ba6c2628f893678924d66382f962557514f66b.zip |
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!
Diffstat (limited to 'src/lombok/eclipse/handlers')
-rw-r--r-- | src/lombok/eclipse/handlers/HandleCleanup.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<Cleanup> { 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<Cleanup> { return true; } - start++; + start++; //We start with try{} *AFTER* the var declaration. int end; if ( isSwitch ) { |