Allow "Convert 'compareTo()' expression to 'equals()' call" intention in more cases

This commit is contained in:
Bas Leijdekkers
2016-10-29 20:50:04 +02:00
parent eb6d8cf0be
commit 50d645e256
8 changed files with 103 additions and 94 deletions
@@ -0,0 +1,9 @@
class X implements Comparable<X> {
boolean m(X x) {
return <caret>compareTo(x) == ((int)0.0);
}
public int compareTo(X x) {
return 0;
}
}
@@ -0,0 +1,9 @@
class X implements Comparable<X> {
boolean m(X x) {
return equals(x);
}
public int compareTo(X x) {
return 0;
}
}