You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found during adding nullable annotations to TypeConverter (#54961)
Current logic of PropertyDescriptorCollection is inconsistent about allowing null PropertyDescriptor, i.e.:
constructors taking PropertyDescriptor[] do not guard against null values
Add, Insert, Remove doesn't have a null check
Find if it encounters null property when searching will in many cases throw NRE as it accesses Name without any null checks
anything triggering sorting (InternalSort) for non empty collection will most likely throw NRE because it accesses Name without null checks
I've conservatively marked them as non-accepting the null as that will provide most intuitive experience. The solution here is to do one of the following:
add null checks and throw on null
allow for nulls everywhere
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @safern
See info in area-owners.md if you want to be subscribed.
Issue Details
Found during adding nullable annotations to TypeConverter (#54961)
Current logic of PropertyDescriptorCollection is inconsistent about allowing null PropertyDescriptor, i.e.:
constructors taking PropertyDescriptor[] do not guard against null values
Add, Insert, Remove doesn't have a null check
Find if it encounters null property when searching will in many cases throw NRE as it accesses Name without any null checks
anything triggering sorting (InternalSort) for non empty collection will most likely throw NRE because it accesses Name without null checks
I've conservatively marked them as non-accepting the null as that will provide most intuitive experience. The solution here is to do one of the following:
Found during adding nullable annotations to TypeConverter (#54961)
Current logic of PropertyDescriptorCollection is inconsistent about allowing null PropertyDescriptor, i.e.:
PropertyDescriptor[]
do not guard against null valuesAdd
,Insert
,Remove
doesn't have a null checkFind
if it encounters null property when searching will in many cases throw NRE as it accessesName
without any null checksInternalSort
) for non empty collection will most likely throw NRE because it accessesName
without null checksI've conservatively marked them as non-accepting the null as that will provide most intuitive experience. The solution here is to do one of the following:
The text was updated successfully, but these errors were encountered: