This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 216139 - isValidAttribute method allows an invalid Attrbute to pass
Summary: isValidAttribute method allows an invalid Attrbute to pass
Status: CLOSED WONTFIX
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: S0.2.2.5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-22 09:34 EST by Richard Craddock CLA
Modified: 2012-03-26 10:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Craddock CLA 2008-01-22 09:34:27 EST
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.
Comment 1 Navid Mehregani CLA 2012-03-26 10:14:44 EDT
Please reopen this defect if it's still an issue and provide more details.