Fix UtilityClass test case

This commit is contained in:
Rawi01 authored and Roel Spilker committed 2020-06-25 20:35:04 +02:00
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;