Fix isNullableType() to always consider flexible types, even if they contain type parameters
This commit is contained in:
@@ -424,12 +424,12 @@ public class TypeUtils {
|
||||
if (type.isNullable()) {
|
||||
return true;
|
||||
}
|
||||
if (type.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {
|
||||
return hasNullableSuperType(type);
|
||||
}
|
||||
if (TypesPackage.isFlexible(type) && isNullableType(((FlexibleType) type).getUpperBound())) {
|
||||
return true;
|
||||
}
|
||||
if (type.getConstructor().getDeclarationDescriptor() instanceof TypeParameterDescriptor) {
|
||||
return hasNullableSuperType(type);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user