diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-27 11:45:09 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-11-27 11:45:09 +0100 |
commit | 003acffe45f5fb1b13c3ca92cb2f0822857fe437 (patch) | |
tree | 2b6c4e362e285e591bf2d171fb9b80de4b127a0c /src/core/lombok | |
parent | 7d63d0389621bd5d3c89d017696ed586ebf4a2b4 (diff) | |
download | lombok-003acffe45f5fb1b13c3ca92cb2f0822857fe437.tar.gz lombok-003acffe45f5fb1b13c3ca92cb2f0822857fe437.tar.bz2 lombok-003acffe45f5fb1b13c3ca92cb2f0822857fe437.zip |
Pretty crucial bugfix that stopped all lombok annotations on types from working with javac. Whoops.
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/handlers/JavacHandlerUtil.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/JavacHandlerUtil.java b/src/core/lombok/javac/handlers/JavacHandlerUtil.java index caa8a998..3aa45c97 100644 --- a/src/core/lombok/javac/handlers/JavacHandlerUtil.java +++ b/src/core/lombok/javac/handlers/JavacHandlerUtil.java @@ -77,8 +77,17 @@ public class JavacHandlerUtil { JCMethodDecl method = (JCMethodDecl) parentNode.get(); method.mods.annotations = filterList(method.mods.annotations, annotation.get()); break; + case TYPE: + try { + JCClassDecl type = (JCClassDecl) parentNode.get(); + type.mods.annotations = filterList(type.mods.annotations, annotation.get()); + } catch (ClassCastException e) { + //something rather odd has been annotated. Better to just break only delombok instead of everything. + } + break; default: - throw new IllegalStateException("Don't know how to remove annotations from: " + parentNode.getKind()); + //This really shouldn't happen, but if it does, better just break delombok instead of breaking everything. + return; } parentNode.removeChild(annotation); |