blob: 221d681a811c1119acb078875029f63f543f1360 [file]
import org.jetbrains.annotations.*;
class Test {
@Contract("!null -> null")
static String test(String s) {
if(s != null) {
return <warning descr="Contract clause '!null -> null' is violated">getValue(s)</warning>;
}
return getDefaultValue();
}
@NotNull
static String getValue(String s) {
return s.trim();
}
static String getDefaultValue() {
return "foo";
}
}