From 3cc3a4e47dfedba3bb4e2187f1e8faa76444d890 Mon Sep 17 00:00:00 2001 From: Tagir Valeev Date: Wed, 19 Oct 2016 16:33:09 +0700 Subject: [PATCH] PsiUtil.resolveClassInType used (IDEA-CR-14640) --- .../codeInspection/LambdaCanBeMethodReferenceInspection.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java index 48dbf15eda4b..d45440dbe99a 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java @@ -298,9 +298,7 @@ public class LambdaCanBeMethodReferenceInspection extends BaseJavaBatchLocalInsp return null; } PsiType type = typeElement.getType(); - if (type instanceof PsiPrimitiveType) return null; - type = type.getDeepComponentType(); - if (type instanceof PsiClassType && (((PsiClassType)type).resolve() instanceof PsiTypeParameter)) return null; + if (type instanceof PsiPrimitiveType || PsiUtil.resolveClassInType(type) instanceof PsiTypeParameter) return null; return expression; } }