LambdaAndExplicitMethodPair: fixed negations (IDEA-CR-48396); imports in tests fixed

GitOrigin-RevId: 6dcd3aa510e733070f5f942d22ce68250d2c5cee
This commit is contained in:
Tagir Valeev
2019-06-15 07:01:36 +03:00
committed by intellij-monorepo-bot
parent 95d1cd538b
commit 13be43ae66
5 changed files with 6 additions and 6 deletions
@@ -26,9 +26,9 @@ class LambdaAndExplicitMethodPair {
new LambdaAndExplicitMethodPair(CommonClassNames.JAVA_UTIL_MAP, "computeIfAbsent", "putIfAbsent", 1, "V", "k") {
@Override
boolean isLambdaCall(PsiMethodCallExpression lambdaCall, PsiLambdaExpression lambda) {
return !ExpressionUtils.isVoidContext(lambdaCall) &&
return ExpressionUtils.isVoidContext(lambdaCall) &&
super.isLambdaCall(lambdaCall, lambda) &&
DfaUtil.inferLambdaNullability(lambda) != Nullability.NOT_NULL;
DfaUtil.inferLambdaNullability(lambda) == Nullability.NOT_NULL;
}
@Override
@@ -1,6 +1,6 @@
// "Use 'computeIfAbsent' method with functional argument" "true"
import java.util.Map;
import java.util.*;
class Test {
public void test(Map<String, List<Integer>> map, String key) {
@@ -1,6 +1,6 @@
// "Use 'computeIfAbsent' method with functional argument" "true"
import java.util.Map;
import java.util.*;
class Test {
public void test(Map<String, List<Integer>> map, String key) {
@@ -1,6 +1,6 @@
// "Use 'computeIfAbsent' method with functional argument" "false"
import java.util.Map;
import java.util.*;
class Test {
public void test(Map<String, List<Integer>> map, String key) {
@@ -1,6 +1,6 @@
// "Use 'computeIfAbsent' method with functional argument" "false"
import java.util.Map;
import java.util.*;
class Test {
public void test(Map<String, List<Integer>> map, String key) {