Some enumerations such as xtk:dataTransfer:decimalCount are a little bit special.
They are of numeric type (baseType=short in this case)
They have several enum values for which the "value" is not defined (only "name" is defined)
The "name" property of enumeration values may be a stringified number (ex: "0")
This cause a problem loading schemas since enumeration values are indexed in an array map as both a map (indexed by enum name) and as an array (indexed by the order of apperance of value elements).
In this example, the first value (with name "all") is indexed with index 0 (as it is the first one), and the second value is indexed with name "0" which collides with the previous and causes an error.
Description
Some enumerations such as xtk:dataTransfer:decimalCount are a little bit special.
This cause a problem loading schemas since enumeration values are indexed in an array map as both a map (indexed by enum name) and as an array (indexed by the order of apperance of value elements). In this example, the first value (with name "all") is indexed with index 0 (as it is the first one), and the second value is indexed with name "0" which collides with the previous and causes an error.
The fix consists in detecting such enumerations and only index by name.
How Has This Been Tested?
Unit tests
Types of changes
Checklist: