Skip to content

Null Element IDs Crashes JeffFerguson.Gepsio.Xsd.Element.GetHashCode() #57

@JeffFerguson

Description

@JeffFerguson

The schema at http://www.xbrl.org/2006/xbrldi-2006.xsd does not make use of the id attribute on its schema elements. Gepsio leaves the value of the Id property of the JeffFerguson.Gepsio.Xsd.Element object as null when objects are hydrated from schema element definitions without ID attributes. Since the implementation of GetHashCode() for the JeffFerguson.Gepsio.Xsd.Element object relies on a non-null Id property value, code that uses the GetHashCode() method will crash with an object reference exception.

Gepsio should ensure that the Id property on JeffFerguson.Gepsio.Xsd.Element objects is always non-null and should also use a different property, perhaps Name, in its GetHashCode() implementation so that hash uniqueness can be assured.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions