Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2006-06-07 01:47:17 +0000
committerkhussey2006-06-07 01:47:17 +0000
commit7c4e9131afcac39b38b006ac35ced4ee072372c5 (patch)
treea74101b2867c260704f7c3ca5c2e052016f072cc
parent9d121246aeaec5d42071c1cbd18ce048cf6e5ad2 (diff)
downloadorg.eclipse.uml2.test-7c4e9131afcac39b38b006ac35ced4ee072372c5.tar.gz
org.eclipse.uml2.test-7c4e9131afcac39b38b006ac35ced4ee072372c5.tar.xz
org.eclipse.uml2.test-7c4e9131afcac39b38b006ac35ced4ee072372c5.zip
[145674] Avoiding potential ClassCastException in UML2EcoreConverter.
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
index 49551d02..ec2737c1 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: UMLUtil.java,v 1.32 2006/05/24 20:12:54 khussey Exp $
+ * $Id: UMLUtil.java,v 1.33 2006/06/07 01:47:17 khussey Exp $
*/
package org.eclipse.uml2.uml.util;
@@ -1872,13 +1872,18 @@ public class UMLUtil
eType = EcorePackage.eINSTANCE.getEShort();
} else if (qualifiedName
.startsWith("EcorePrimitiveTypes::")) { //$NON-NLS-1$
+
eType = EcorePackage.eINSTANCE.getEClassifier(type
.getName());
}
}
if (eType == null) {
- eType = (EClassifier) doSwitch(type);
+ Object eObject = doSwitch(type);
+
+ if (eObject instanceof EClassifier) {
+ eType = (EClassifier) eObject;
+ }
}
}

Back to the top