Conversation
- If the relatedFeature has no owner, then it is added as an ownedRelatedElement of the reference subsetting on the connector end.
Checks if TransitionUsage succession is null before creating an implicit binding connector to it. A TransitionUsage should always have a nested succession, but this avoids an NPE if the usage is ill-formed.
- FeatureAdapter::getBoundValueResult - TypeAdapter::addResultBinding
martynaslelevicius
approved these changes
May 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR corrects a bug that can cause an exception when a model is saved to XMI with implicit elements.
In the Beta 3 version of the KerML Specification, the
checkFeatureValueBindingConnectorconstraint was updated so that the impliedBindingConnectorfor aFeatureValueis between thefeatureWithValueand a feature chain consisting of thevalueExpressionand theresultof thatExpression(where previously it had been directly to theresult). This was implemented in the 2025-02 release (see change toFeatureAdapterin PR #638). The target feature chain of the impliedBindingConnectorshould have been owned by theReferenceSubsettingrelating it to the appropriateconnectorEnd. Unfortunately, the implementation did not do this, so the owningFeaturefor the feature chain ended up not being contained in the resource being saved to XMI, which can cause the exception.This PR fixes the bug by adding a check to
ConnectorUtil::addConnectorEndof whether the givenrelatedElementhas an owner. If not, therelatedElementis added as anownedRelatedElementof theReferenceSubsettingof theconnectorEndbeing created.