IDEA-111456 An inspection to check method contract well-formedness

This commit is contained in:
peter
2013-08-07 20:25:51 +02:00
parent 5c8b981269
commit 046b657318
5 changed files with 52 additions and 9 deletions
@@ -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) {}
}