[java-psi] InferenceSession: warnings fixed

GitOrigin-RevId: 60b1e03813a1b1e549096cd38e163d7e9b96f570
This commit is contained in:
Tagir Valeev
2024-11-22 15:34:30 +00:00
committed by intellij-monorepo-bot
parent 68e240546f
commit 8f422d63c5
@@ -1259,10 +1259,9 @@ public class InferenceSession {
}
private boolean isLowerBoundNotAssignable(InferenceVariable var, PsiType eqBound, boolean allowUncheckedConversion) {
return var
.getBounds(InferenceBound.LOWER)
.stream()
.anyMatch(lBound -> isProperType(lBound) && !TypeConversionUtil.isAssignable(eqBound, lBound, allowUncheckedConversion));
return ContainerUtil.exists(
var.getBounds(InferenceBound.LOWER),
lBound -> isProperType(lBound) && !TypeConversionUtil.isAssignable(eqBound, lBound, allowUncheckedConversion));
}
private static @Nls String getConjunctsConflict(PsiIntersectionType type) {
@@ -1880,8 +1879,9 @@ public class InferenceSession {
}
if (arg instanceof PsiSwitchExpression) {
return PsiUtil.getSwitchResultExpressions((PsiSwitchExpression)arg).stream()
.allMatch(resultExpression -> argConstraints(resultExpression, session, sInterfaceMethod, sSubstitutor, tInterfaceMethod, tSubstitutor));
return ContainerUtil.and(
PsiUtil.getSwitchResultExpressions((PsiSwitchExpression)arg),
resultExpression -> argConstraints(resultExpression, session, sInterfaceMethod, sSubstitutor, tInterfaceMethod, tSubstitutor));
}
return false;
}