mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
[java-refactoring] Replace constructor with builder: do not touch anonymous classes
Fixes IDEA-354668 "Replace constructor with builder" does not handle anonymous classes correctly GitOrigin-RevId: f7d340c1fe3f82bbdaba04db35512faa8ace7289
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e72accd2a3
commit
ca672acb50
@@ -0,0 +1,5 @@
|
||||
public class Builder {
|
||||
public Test createTest() {
|
||||
return new Test();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
Test() {}
|
||||
}
|
||||
class Cls2 {
|
||||
Test test = new Test() {
|
||||
void x() {}
|
||||
};
|
||||
|
||||
|
||||
void use() {
|
||||
Test test = new Builder().createTest();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
Test() {}
|
||||
}
|
||||
class Cls2 {
|
||||
Test test = new Test() {
|
||||
void x() {}
|
||||
};
|
||||
|
||||
|
||||
void use() {
|
||||
Test test = new Test();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user