aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@tipit.to>2009-07-01 00:26:19 +0200
committerReinier Zwitserloot <reinier@tipit.to>2009-07-01 00:26:19 +0200
commit23ba6c2628f893678924d66382f962557514f66b (patch)
tree9a86da68896a4479584720ed2834c06c136c1a69 /src/lombok/eclipse
parent008bca204568d4af8ae67d815bbff017aad65dae (diff)
downloadlombok-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')
-rw-r--r--src/lombok/eclipse/handlers/HandleCleanup.java4
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 ) {