void (GrMethodCall methodCall) { GrExpression invokedExpression = methodCall.getInvokedExpression(); if (!(invokedExpression instanceof GrReferenceExpression)) return; String name = ((GrReferenceExpression)invokedExpression).getReferenceName(); if (!"equals".equals(name)) return; final PsiType leftType = PsiImplUtil.getQualifierType((GrReferenceExpression)invokedExpression); if (leftType == null) return; PsiType[] argumentTypes = PsiUtil.getArgumentTypes(methodCall.getArgumentList()); if (argumentTypes == null || argumentTypes.length != 1) return; PsiType rightType = argumentTypes[0]; if (rightType == null) return; final PsiMethod method = methodCall.resolveMethod(); if (!MethodUtils.isEquals(method)) return; if (method.hasModifierProperty(PsiModifier.STATIC)) return; if (TypeUtils.areConvertible(rightType, leftType)) return; registerMethodCallError(methodCall, "equals()", leftType.getPresentableText(), rightType.getPresentableText()); }