mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
don't throw exceptions on contracts with several clauses
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user