[java-psi] IDEA-377483 Wrong NPE message when iterating over Iterables.concat

Handle when `T extends @Nullable Type` is instantiated with unknown nullability

GitOrigin-RevId: 21d7cc928f4f5d9ac037fa42a632f936ed6c6516
This commit is contained in:
Tagir Valeev
2025-09-22 16:16:42 +00:00
committed by intellij-monorepo-bot
parent ad883180fe
commit 58d5de70e8
3 changed files with 24 additions and 0 deletions
@@ -78,6 +78,9 @@ public final class TypeNullability {
if (this.nullability() == Nullability.NOT_NULL) {
return this;
}
if (this.nullability() == Nullability.NULLABLE && this.source() instanceof NullabilitySource.ExtendsBound) {
return nullability;
}
if (nullability.nullability() == Nullability.NOT_NULL && this.source() instanceof NullabilitySource.ExtendsBound) {
return nullability;
}