Community
Participate
Working Groups
The method "isValidAttribute" on Stereotype only checks that the name of the attribute is the same as an existing attribute. The map that stores values however relies on the specific instance being used as the key, so you can in theory use a invalid attribute of the same name, and the valididty check passes. I dscovered this whilst attempting to copy attributes from one Stereotype to another. This "appeared" to work, but the attribute cannot be retrieved from the map, as it has the key of an "invalid" attribute. This is minor as the problem will probably only occur when using the API for very specific cases.
Please reopen this defect if it's still an issue and provide more details.