mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-111456 An inspection to check method contract well-formedness
This commit is contained in:
@@ -32,4 +32,10 @@ public class AssertIsNotNull {
|
||||
}
|
||||
|
||||
Object call() {return new Object();}
|
||||
|
||||
@Contract(<warning descr="A contract clause must be in form arg1, ..., argN -> return-value">"a"</warning>)
|
||||
void malformedContract() {}
|
||||
|
||||
@Contract(<warning descr="Method takes 2 parameters, while contract clause 0 expects 1">"null -> _"</warning>)
|
||||
void wrongParameterCount(Object a, boolean b) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user