Bug 152600

Summary: Stereotype properties with enumeration collection types are broken
Product: [Modeling] MDT.UML2 Reporter: Dusko <dmisic>
Component: CoreAssignee: Kenn Hussey <Kenn.Hussey>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.