mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +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
22 lines
408 B
Java
22 lines
408 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class Test {
|
|
void foo() {
|
|
final String str = newMethod();
|
|
if (str == null) return;
|
|
new Runnable() {
|
|
public void run() {
|
|
System.out.println(str);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Nullable
|
|
private String newMethod() {
|
|
final String str = "";
|
|
if (str == "a") {
|
|
return null;
|
|
}
|
|
return str;
|
|
}
|
|
} |