void (@NotNull PsiNewExpression newExpression) { super.visitNewExpression(newExpression); if (newExpression.getAnonymousClass() != null) { return; } if (ParenthesesUtils.getParentSkipParentheses(newExpression) instanceof PsiThrowStatement) { return; } final PsiType type = newExpression.getType(); if (type instanceof PsiClassType) { final PsiClass clonedClass = ((PsiClassType) type).resolve(); if (clonedClass != aClass && !InheritanceUtil.isInheritor(clonedClass, CommonClassNames.JAVA_LANG_CLONEABLE)) { return; } } registerNewExpressionError(newExpression, type); }