don't throw exceptions on contracts with several clauses

This commit is contained in:
peter
2013-10-18 17:39:13 +02:00
parent c0631e8338
commit d7e675616d
3 changed files with 15 additions and 1 deletions
@@ -0,0 +1,13 @@
import org.jetbrains.annotations.Contract;
public class Foo {
String foo(Object escaper, String s) {
return escapeStr(s, escaper);
}
@Contract("null,_->null;!null,_->!null")
String escapeStr(String s, Object o) {
return s;
}
}