== Why is this an issue?

Comparisons of objects of different types are likely programming errors since the comparisons will always return false. 


This rule raises an issue when objects with no common ancestor closer than ``++Object++`` are compared.


=== Noncompliant code example

[source,text]
----
public class MyClass {
  private Mountain mountain = new Mountain("Saint Helens");

  public doSomething(Apple apple) {
    if (mountain.equals(apple)) {  // Noncompliant. Huh?
      // ...
    }
  }
}
----

