mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
Calling method with contract shouldn't result in nullability suspicion (IDEA-113763, IDEA-113699, almost IDEA-113143)
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class Foo {
|
||||
|
||||
@Contract("null->null")
|
||||
String foo(String s){
|
||||
return s;
|
||||
}
|
||||
|
||||
void bar(String s, String s2) {
|
||||
foo(s);
|
||||
s.hashCode();
|
||||
goo(foo(s2));
|
||||
}
|
||||
|
||||
void goo(@NotNull String s) {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user