diff options
author | Kenn Hussey | 2012-04-02 18:25:42 +0000 |
---|---|---|
committer | Kenn Hussey | 2012-04-02 18:25:42 +0000 |
commit | 2a3ec67afd09f78d6ee296eb3851efe79a0382e5 (patch) | |
tree | 0ec66dc540d05fb3ecdf1a108e338884dacd9fc1 | |
parent | d23f1efe8a606c668ba8979b5894c647cb27d6e3 (diff) | |
download | org.eclipse.uml2.test-2a3ec67afd09f78d6ee296eb3851efe79a0382e5.tar.gz org.eclipse.uml2.test-2a3ec67afd09f78d6ee296eb3851efe79a0382e5.tar.xz org.eclipse.uml2.test-2a3ec67afd09f78d6ee296eb3851efe79a0382e5.zip |
[375553] Ensuring EnumerationLiteral::classifiers is always empty to
avoid exceptions during deletion.
-rw-r--r-- | plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/EnumerationLiteralOperations.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/EnumerationLiteralOperations.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/EnumerationLiteralOperations.java index c18d4675..4a289b92 100644 --- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/EnumerationLiteralOperations.java +++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/EnumerationLiteralOperations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 CEA and others. + * Copyright (c) 2011, 2012 CEA and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * CEA - initial API and implementation + * Kenn Hussey (CEA) - 375553 * */ package org.eclipse.uml2.uml.internal.operations; @@ -16,7 +17,7 @@ import java.util.Map; import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.common.util.DiagnosticChain; -import org.eclipse.emf.common.util.UniqueEList; +import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.InternalEObject; @@ -98,13 +99,7 @@ public class EnumerationLiteralOperations */ public static EList<Classifier> getClassifiers( EnumerationLiteral enumerationLiteral) { - EList<Classifier> classifiers = new UniqueEList.FastCompare<Classifier>(); - - Enumeration classifier = enumerationLiteral.getClassifier(); - - if (classifier != null) { - classifiers.add(classifier); - } + EList<Classifier> classifiers = ECollections.emptyEList(); return new UnionEObjectEList<Classifier>( (InternalEObject) enumerationLiteral, |