Java: make "Inline method" refactoring "statements before super()" aware (IDEA-340403)

GitOrigin-RevId: da7491d85473d64bbf9525adcfd6021274b6e35c
This commit is contained in:
Bas Leijdekkers
2023-12-22 18:11:49 +01:00
committed by intellij-monorepo-bot
parent 8f2386e1d4
commit 82c1552e82
3 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
class BBB {
public BBB(String x) {
}
void foo(String s) {}
}
class AAA extends BBB {
public AAA(String x) {
String y = x.trim();
super(y.length() > 0 ? y : "aaaa");
}
@Override
void foo(String s) {
String y = s.trim();
super.foo(y.length() > 0 ? y : "aaaa"); //To change body of overridden methods use File | Settings | File Templates.
}
}