void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); if (!MethodCallUtils.isCallToMethod(expression, null, PsiTypes.voidType(), HardcodedMethodConstants.FINALIZE)) { return; } final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(expression, PsiMethod.class); if (containingMethod == null || MethodUtils.isFinalize(containingMethod)) { return; } registerMethodCallError(expression); }