Skip to content

An issue in TypeDescriptor.GetConverter() #31441

Description

@iSazonov

https://github.com/dotnet/corefx/blob/3843042d560549baa492f2c99441fd4571655422/src/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.ReflectedTypeData.cs#L204-L216

In line 206 typeAttr is never null because GetAttributes() returns always an empty collection. Also indexer returns "empty" TypeConverter if the item does not present in the AttributeCollection.
Perhaps code above (for instance) is broken too.

Discovered in PowerShell repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.ComponentModelenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions