void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); EqualityCheck check = EqualityCheck.from(expression); if (check == null) return; final PsiExpression left = check.getLeft(); if (!TypeUtils.expressionHasTypeOrSubtype(left, CommonClassNames.JAVA_LANG_ENUM)) return; final PsiExpression right = check.getRight(); final PsiType comparedTypeErasure = TypeConversionUtil.erasure(left.getType()); final PsiType comparisonTypeErasure = TypeConversionUtil.erasure(right.getType()); if (comparedTypeErasure == null || comparisonTypeErasure == null || !TypeConversionUtil.areTypesConvertible(comparedTypeErasure, comparisonTypeErasure)) { return; } final PsiElement parent = ParenthesesUtils.getParentSkipParentheses(expression); final boolean negated = parent instanceof PsiExpression && BoolUtils.isNegation((PsiExpression)parent); registerMethodCallError(expression, expression, negated); }