mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file) Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
24 lines
458 B
Java
24 lines
458 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Test {
|
|
Object foo() {
|
|
Object o = newMethod();
|
|
if (o == null) return null;
|
|
System.out.println(o);
|
|
return o;
|
|
}
|
|
|
|
@Nullable
|
|
private Object newMethod() {
|
|
Object o = "";
|
|
for (int i = 0; i < 5; i++) {
|
|
if (i == 10){
|
|
o = null;
|
|
}
|
|
}
|
|
if (o == null) {
|
|
return null;
|
|
}
|
|
return o;
|
|
}
|
|
} |