mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
37 lines
547 B
Java
37 lines
547 B
Java
import org.jetbrains.annotations.*;
|
|
|
|
class Test {
|
|
void bar(@Nullable String str) {
|
|
if (str == null) {
|
|
foo(str);
|
|
}
|
|
}
|
|
|
|
String foo(String str) {
|
|
return str;
|
|
}
|
|
|
|
@Nullable
|
|
String foo1(@Nullable String str) {
|
|
if (str == null);
|
|
return (str);
|
|
}
|
|
|
|
@NotNull
|
|
String foo2(@Nullable String str) {
|
|
if (str == null);
|
|
return ((String)str);
|
|
}
|
|
|
|
@NotNull
|
|
String fram(@Nullable String str, boolean b) {
|
|
if (str != null) {
|
|
return b ? str : "not null strimg";
|
|
}
|
|
return "str was null";
|
|
}
|
|
|
|
|
|
|
|
|
|
} |