mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 06:11:42 +07:00
IDEA-112222 Validate @Contract annotation is related to the code
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Foo {
|
||||
@Nullable
|
||||
@Contract ( "_ -> null")
|
||||
String foo(String s) {
|
||||
return <warning descr="Contract clause '_ -> null' is violated">"42"</warning>;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user