[156425] Looking at owner(s) instead of (all) owned elements to detect ownership cycles.
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ElementOperations.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ElementOperations.java
index 67202e9..e48a0a6 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ElementOperations.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ElementOperations.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: ElementOperations.java,v 1.44.2.2 2006/08/16 18:15:08 khussey Exp $
+ * $Id: ElementOperations.java,v 1.44.2.3 2006/09/06 20:56:30 khussey Exp $
*/
package org.eclipse.uml2.uml.internal.operations;
@@ -129,7 +129,7 @@
DiagnosticChain diagnostics, Map context) {
boolean result = true;
- if (element.allOwnedElements().contains(element)) {
+ if (EcoreUtil.isAncestor(element, element.getOwner())) {
result = false;
if (diagnostics != null) {