public BaseInspectionVisitor buildVisitor() {
return new EqualsReplaceableByObjectsCallVisitor();
}
private class EqualsReplaceableByObjectsCallVisitor extends BaseInspectionVisitor {
@Override
<BUG>public void visitMethodCallExpression(PsiMethodCallExpression expression) {
final PsiElement maybeBinary = PsiTreeUtil.skipParentsOfType(expression, PsiParenthesizedExpression.class, PsiPrefixExpression.class);</BUG>
if (maybeBinary instanceof PsiBinaryExpression) {
if (processNotNullCheck((PsiBinaryExpression)maybeBinary)) {
return;

public BaseInspectionVisitor buildVisitor() {
return new EqualsReplaceableByObjectsCallVisitor();
}
private class EqualsReplaceableByObjectsCallVisitor extends BaseInspectionVisitor {
@Override
public void visitMethodCallExpression(PsiMethodCallExpression expression) {
final String methodName = expression.getMethodExpression().getReferenceName();
if (!HardcodedMethodConstants.EQUALS.equals(methodName)) {
return;
}
final PsiElement maybeBinary = PsiTreeUtil.skipParentsOfType(expression, PsiParenthesizedExpression.class, PsiPrefixExpression.class);
if (maybeBinary instanceof PsiBinaryExpression) {
if (processNotNullCheck((PsiBinaryExpression)maybeBinary)) {
return;
