mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 06:51:17 +07:00
HardcodedContracts: fixed fromText calls
GitOrigin-RevId: d2eaadc6e0c2bb0aca873b52d44eee0715beb059
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ed70ea3cca
commit
9c01012c08
+4
-4
@@ -118,7 +118,7 @@ public class HardcodedContracts {
|
||||
.register(staticCall(JAVA_UTIL_ARRAYS, "binarySearch", "fill", "parallelPrefix", "parallelSort", "sort", "spliterator", "stream"),
|
||||
(call, cnt) -> cnt >= 3 ? ARRAY_RANGE_CONTRACTS : null)
|
||||
.register(staticCall("org.mockito.ArgumentMatchers", "argThat").parameterCount(1),
|
||||
ContractProvider.of(StandardMethodContract.fromText("_ -> _")))
|
||||
ContractProvider.of(StandardMethodContract.fromText("_->_")))
|
||||
.register(anyOf(
|
||||
instanceCall("java.util.Queue", "peek", "poll").parameterCount(0),
|
||||
instanceCall("java.util.Deque", "peekFirst", "peekLast", "pollFirst", "pollLast").parameterCount(0)),
|
||||
@@ -151,10 +151,10 @@ public class HardcodedContracts {
|
||||
ContractProvider.of(
|
||||
singleConditionContract(ContractValue.argument(0), DfaRelationValue.RelationType.EQ, ContractValue.argument(1),
|
||||
returnTrue()),
|
||||
StandardMethodContract.fromText("null, !null -> false"),
|
||||
StandardMethodContract.fromText("!null, null -> false")
|
||||
StandardMethodContract.fromText("null,!null->false"),
|
||||
StandardMethodContract.fromText("!null,null->false")
|
||||
))
|
||||
.register(enumValues(), ContractProvider.of(StandardMethodContract.fromText("-> new")));
|
||||
.register(enumValues(), ContractProvider.of(StandardMethodContract.fromText("->new")));
|
||||
|
||||
public static List<MethodContract> getHardcodedContracts(@NotNull PsiMethod method, @Nullable PsiMethodCallExpression call) {
|
||||
PsiClass owner = method.getContainingClass();
|
||||
|
||||
Reference in New Issue
Block a user