-
Notifications
You must be signed in to change notification settings - Fork 3
DontMoveOverridden test
Artyom Lobanov edited this page Jul 11, 2017
·
1 revision
Check that algorithms don't try to move methods which override methods from super class.
Member | Move to |
---|---|
- | - |
package dontMoveOverridden;
import java.util.Comparator;
public class ClassA implements Comparator<Integer> {
public int compare(Integer o1, Integer o2) {
return o1.hashCode() - o2.hashCode();
}
}
package dontMoveOverridden;
public class ClassB {
final ClassA a = new ClassA();
void methodB1() {
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
}
void methodB2() {
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
a.compare(0, 1);
}
}