void (@NotNull PsiClass aClass) { if (aClass.isInterface() || aClass.isAnnotationType() || aClass instanceof PsiTypeParameter) { return; } if (!CloneUtils.isCloneable(aClass)) { return; } for (final PsiMethod method : aClass.findMethodsByName("clone", true)) { final PsiClass containingClass = method.getContainingClass(); if (containingClass != null && CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName())) { // optimization break; } if (CloneUtils.isClone(method) && ControlFlowUtils.methodAlwaysThrowsException((PsiMethod)method.getNavigationElement())) { return; } } registerClassError(aClass, aClass); }