Skip to content

Commit 413d42b

Browse files
committed
ST6RI-888 Corrected caching to fix the owned cross feature typing bug.
1 parent c6cbf94 commit 413d42b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

org.omg.sysml/src/org/omg/sysml/adapter/FeatureAdapter.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,12 @@ public boolean isComputeRedefinitions() {
544544

545545
public EList<Type> getAllTypes() {
546546
if (types == null) {
547-
types = new NonNotifyingEObjectEList<Type>(Type.class, (InternalEObject)getTarget(), SysMLPackage.FEATURE__TYPE);
548-
getTypes(types, new HashSet<Feature>());
549-
removeRedundantTypes(types);
547+
EList<Type> allTypes = new NonNotifyingEObjectEList<Type>(Type.class, (InternalEObject)getTarget(), SysMLPackage.FEATURE__TYPE);
548+
getTypes(allTypes, new HashSet<Feature>());
549+
removeRedundantTypes(allTypes);
550+
// Note: Cache must be set only after completion of computation of types, in order to correctly
551+
// a possible circular recursive call back to this method.
552+
types = allTypes;
550553
}
551554
return types;
552555
}

0 commit comments

Comments
 (0)