Files
openide/java/java-tests/testData/refactoring/inlineMethod/InlineSingleImplementationCastOnThisUnnecessary.java
Tagir Valeev ff60a4753c [java-refactoring] IDEA-360614 Replace with single implementation: no downcast when 'this' is used
GitOrigin-RevId: f2ea406a5cf229cf9e63b6c2b53b9d86f245a6d9
2024-11-26 09:06:06 +00:00

17 lines
354 B
Java

public class InlineSingleImplementation {
interface MyIface {
void mySimpleMethod();
}
static class MyIfaceImpl implements MyIface {
@Override
public void mySimpleMethod() {
System.out.println(toString());
System.out.println(this.toString());
}
}
void test(MyIface iface) {
iface.<caret>mySimpleMethod();
}
}