Conversation
-- Also for BindingConnectorAsUsage, BindingConnector and Succession.
- Check if name is null, to avoid exception from toQualifiedName. - Check if context resourceSet is null, to avoid exception from getResourceDescription.
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 fixes a bug that caused an
IllegalArgumentExceptionto be thrown when a succession is typed by a connection definition. Now, it is not actually semantically correct to type a succession with a connection definition, because connection definitions are kinds of temporal association structures. But doing so shouldn't cause an exception.The PR also updates the implicit specialization mapping for binding connectors and successions in KerML so that they get the correct implied specialization even when typed by an association structure.
Cause
As a binary connector, when a succession is typed by an association structure, it's implied specialization target is looked up in the
ImplicitGeneralizationMapusing the keybinaryObject. The problem was thatSuccessionAsUsageImplhad no entry forobjectBinary(since it is not supposed to be typed by an association structure). Further, the single inheritance forSuccessionAsUsageImplis toConnectorAsUsageImpland thenUsageImpl(notConnectorImpl), so the superclasses didn’t provide a value forobjectBinaryeither. The lookup returned an empty qualified name string, which caused the exception on conversion to a qualified name.Changes
binaryObjectto theImplicitGeneralizationMapfor the following classes:BinaryConnectorImplSuccessionImplBinaryConnectorAsUsageImplSuccessionAsUsageImplKerMLLibraryProvider.getElementto check for a null name rather than throw an exception.