mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
Java: Don't introduce parameter for potentially matching fields if the fields are written (IDEA-182284)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import java.util.List;
|
||||
|
||||
class C {
|
||||
List<String> x;
|
||||
List<String> y;
|
||||
|
||||
private void foo() {
|
||||
<selection>
|
||||
if (x.isEmpty()) return;
|
||||
x.remove(0);
|
||||
y.add(str());
|
||||
baz();</selection>
|
||||
}
|
||||
|
||||
private void bar() {
|
||||
if (y.isEmpty()) return;
|
||||
y.remove(0);
|
||||
x.add(str());
|
||||
baz();
|
||||
}
|
||||
|
||||
private void baz() { }
|
||||
private String str() { return null; }
|
||||
}
|
||||
Reference in New Issue
Block a user