mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 20:15:09 +00:00
Pretty crucial bugfix that stopped all lombok annotations on types from working with javac. Whoops.
This commit is contained in:
1 parent
7d63d03896
commit
003acffe45
1 file changed
+10
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user