Bug 152600 - Stereotype properties with enumeration collection types are broken
Summary: Stereotype properties with enumeration collection types are broken
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-02 10:35 EDT by Dusko CLA
Modified: 2008-01-28 16:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dusko CLA 2006-08-02 10:35:20 EDT
Stereotype properties with enumeration collection types are broken.

Steps to reproduce:
1) Create an Enumeration in a Profile and add a few Enumeration Literals to it.
2) Add 2 properties "a" and "b" to some Stereotype. Type them with the Enumeration. Leave multiplicity for property "a" as default (scalar) but make property "b" collection (multiplicity "1..*").
3) Save profile, apply to some model and apply the stereotype to some element. Try to get value for "a" and "b".
4) Works for "a" but throws class cast exception in the log (please see below).

Stack trace:

java.lang.ClassCastException: org.eclipse.emf.ecore.util.EcoreEList$Dynamic incompatible with org.eclipse.emf.ecore.EEnumLiteral
	at org.eclipse.uml2.uml.internal.operations.ElementOperations.getValue(ElementOperations.java:571)
	at org.eclipse.uml2.uml.internal.impl.ElementImpl.getValue(ElementImpl.java:286)
	at
       ...
Comment 1 Kenn Hussey CLA 2006-08-02 11:21:57 EDT
The fix has been committed to CVS.
Comment 2 Kenn Hussey CLA 2006-08-03 10:28:49 EDT
Fixed in M200608030300.
Comment 3 Nick Boldt CLA 2008-01-28 16:36:05 EST
Move to verified as per bug 206558.