blob: 500b5e4bfc55bd59f83f88d71316b72452cfb5a7 [file]
import foo.*;
class Test {
public void test() {
@NotNull
String a = notNull(getNullable());
@NotNull
String b = <warning descr="The call to 'notNull' always fails, according to its method contracts">notNull</warning>(null);
}
@Nullable
public String getNullable() {
return null;
}
@NotNull
private static <T> T notNull(@Nullable T value) {
if (value == null) {
throw new RuntimeException("null");
}
return value;
}
}