void (@NotNull PsiClass aClass) { if (!aClass.hasModifierProperty(PsiModifier.FINAL)) { return; } if (SealedUtils.hasSealedParent(aClass)) { // removing `final` in this case would make the code uncompilable return; } registerModifierError(PsiModifier.FINAL, aClass, PsiModifier.FINAL, aClass); }