mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 10:18:46 +00:00
Fix UtilityClass test case
This commit is contained in:
1 parent
ed8ea0d804
commit
e964c995ca
2 files changed
+2
-2
No files matched your search
@@ -113,7 +113,7 @@ public class HandleUtilityClass extends EclipseAnnotationHandler<UtilityClass> {
|
||||
if (typeNode.up().getKind() == Kind.COMPILATION_UNIT) markStatic = false;
|
||||
if (markStatic && typeNode.up().getKind() == Kind.TYPE) {
|
||||
TypeDeclaration typeDecl = (TypeDeclaration) typeNode.up().get();
|
||||
if ((typeDecl.modifiers & (ClassFileConstants.AccInterface | ClassFileConstants.AccAnnotation | ClassFileConstants.AccEnum)) != 0) markStatic = false;
|
||||
if ((typeDecl.modifiers & (ClassFileConstants.AccInterface | ClassFileConstants.AccAnnotation)) != 0) markStatic = false;
|
||||
}
|
||||
|
||||
if (markStatic) classDecl.modifiers |= ClassFileConstants.AccStatic;
|
||||
|
||||
@@ -110,7 +110,7 @@ public class HandleUtilityClass extends JavacAnnotationHandler<UtilityClass> {
|
||||
if (typeNode.up().getKind() == Kind.COMPILATION_UNIT) markStatic = false;
|
||||
if (markStatic && typeNode.up().getKind() == Kind.TYPE) {
|
||||
JCClassDecl typeDecl = (JCClassDecl) typeNode.up().get();
|
||||
if ((typeDecl.mods.flags & (Flags.INTERFACE | Flags.ANNOTATION | Flags.ENUM)) != 0) markStatic = false;
|
||||
if ((typeDecl.mods.flags & (Flags.INTERFACE | Flags.ANNOTATION)) != 0) markStatic = false;
|
||||
}
|
||||
|
||||
if (markStatic) classDecl.mods.flags |= Flags.STATIC;
|
||||
|
||||
Reference in new issue
Block a user