Files
openide/java/java-tests/testData/refactoring/extractMethod/NotNullArgument1_after.java

22 lines
421 B
Java

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
class C {
void f(@Nullable Object o) {
if (o != null) {
newMethod(o);
}
}
private void newMethod(@NotNull Object o) {
if (o instanceof String) {
o = 1;
} else {
System.out.println(o);
}
g(o);
}
void g(@NotNull Object o) {
}
}