void (List<PsiClass> inheritors) { for (PsiClass inheritor : inheritors) { PsiModifierList modifierList = inheritor.getModifierList(); assert modifierList != null; // ensured by absence of anonymous classes if (modifierList.hasModifierProperty(PsiModifier.SEALED) || modifierList.hasModifierProperty(PsiModifier.NON_SEALED) || modifierList.hasModifierProperty(PsiModifier.FINAL)) { continue; } modifierList.setModifierProperty(PsiModifier.NON_SEALED, true); } }