mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
extract method: allow to extract @NotNull code with missed branches which would be replaced with 'return null' with check on call site (IDEA-120076)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
class C {
|
||||
public Object m() {
|
||||
Object o = newMethod();
|
||||
if (o != null) return o;
|
||||
return null;
|
||||
}
|
||||
|
||||
private Object newMethod() {
|
||||
for (Object o : new ArrayList<Object>()) {
|
||||
if (o != null) {
|
||||
return o;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user