Skip to content

Comments

ST6RI-914 Succession typed by connection def causes exception in SysML#740

Open
seidewitz wants to merge 2 commits intomasterfrom
ST6RI-914
Open

ST6RI-914 Succession typed by connection def causes exception in SysML#740
seidewitz wants to merge 2 commits intomasterfrom
ST6RI-914

Conversation

@seidewitz
Copy link
Member

@seidewitz seidewitz commented Feb 20, 2026

This PR fixes a bug that caused an IllegalArgumentException to 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 ImplicitGeneralizationMap using the key binaryObject. The problem was that SuccessionAsUsageImpl had no entry for objectBinary (since it is not supposed to be typed by an association structure). Further, the single inheritance for SuccessionAsUsageImpl is to ConnectorAsUsageImpl and then UsageImpl (not ConnectorImpl), so the superclasses didn’t provide a value for objectBinary either. The lookup returned an empty qualified name string, which caused the exception on conversion to a qualified name.

Changes

  1. Add an entry for the key binaryObject to the ImplicitGeneralizationMap for the following classes:
    • BinaryConnectorImpl
    • SuccessionImpl
    • BinaryConnectorAsUsageImpl
    • SuccessionAsUsageImpl
  2. Update KerMLLibraryProvider.getElement to check for a null name rather than throw an exception.

-- Also for BindingConnectorAsUsage, BindingConnector and Succession.
@seidewitz seidewitz self-assigned this Feb 20, 2026
@seidewitz seidewitz added this to the 2026-02 milestone Feb 20, 2026
- Check if name is null, to avoid exception from toQualifiedName.
- Check if context resourceSet is null, to avoid exception from
getResourceDescription.
@seidewitz seidewitz requested a review from himi February 20, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant