mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ConstructionUtils#isCustomizedEmptyCollectionInitializer: InheritanceUtil.isInheritor used (IDEA-CR-18238)
This commit is contained in:
+1
-2
@@ -133,8 +133,7 @@ public class ConstructionUtils {
|
||||
PsiClass aClass = constructor.getContainingClass();
|
||||
if (aClass == null || aClass.getQualifiedName() == null || !aClass.getQualifiedName().startsWith("java.util.")) return false;
|
||||
Predicate<PsiType> allowedParameterType = t -> t instanceof PsiPrimitiveType ||
|
||||
(t instanceof PsiClassType &&
|
||||
((PsiClassType)t).rawType().equalsToText(CommonClassNames.JAVA_LANG_CLASS));
|
||||
com.intellij.psi.util.InheritanceUtil.isInheritor(t, CommonClassNames.JAVA_LANG_CLASS);
|
||||
return Stream.of(constructor.getParameterList().getParameters()).map(PsiParameter::getType).allMatch(allowedParameterType);
|
||||
}
|
||||
if (expression instanceof PsiMethodCallExpression) {
|
||||
|
||||
Reference in New Issue
Block a user