Java: Don't cause endless recursive calls of the equals() method in the inspection...
[idea/community.git] / plugins / InspectionGadgets / test / com / siyeh / igfixes / equality / replace_equality_with_equals / CompareThisInEqualsMethod.java
1 class Demo {
2   private Object field;
3
4   @Override
5   public boolean equals(Object obj) {
6     if (this <caret>== obj) {
7       return true;
8     }
9     else {
10       Demo other = (Demo)obj;
11       return field == other.field;
12     }
13   }
14 }