Skip to content

ST6RI-913 Exception opening .kermlx and .sysmlx files in editor#737

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

ST6RI-913 Exception opening .kermlx and .sysmlx files in editor#737
seidewitz wants to merge 2 commits intomasterfrom
ST6RI-913

Conversation

@seidewitz
Copy link
Member

On of the updates in PR #734 was to move the OperandEList class to the org.omg.sysml.util package and re-implementation. This new implementation did not support the iterator method. However, when a .kermlx and .sysmlx file is opened in the Eclipse editor, iterator is called to get an iterator with which to iterate over the values of structural features. Even though the operands list is not included in XMI serialization, the system still calls iterate on the OperandEList for the operand structural feature, which resulted in a UnsupportedOperationException.

This PR updates EOperandList.iterator so that it returns the emptyIterator.

@seidewitz seidewitz added this to the 2026-02 milestone Feb 13, 2026
@seidewitz seidewitz self-assigned this Feb 13, 2026
@seidewitz seidewitz added the bug Something isn't working label Feb 13, 2026
@seidewitz seidewitz requested a review from himi February 13, 2026 20:12
@himi
Copy link
Member

himi commented Feb 14, 2026

It might be a different topic, but I found SysML2XMI sysml/src/validation/10-Analysis and Trades/10d-Dynamics Analysis.sysml failed with NullPointerException:

Transforming...
java.lang.NullPointerException: Cannot invoke "org.omg.sysml.lang.sysml.Feature.getChainingFeature()" because "feature" is null
	at org.omg.sysml.util.FeatureUtil.chainFeatures(FeatureUtil.java:404)
	at org.omg.sysml.adapter.FeatureAdapter.computeValueConnector(FeatureAdapter.java:825)
	at org.omg.sysml.adapter.UsageAdapter.computeValueConnector(UsageAdapter.java:214)
	at org.omg.sysml.adapter.FeatureAdapter.doTransform(FeatureAdapter.java:901)
	at org.omg.sysml.adapter.UsageAdapter.doTransform(UsageAdapter.java:223)
	at org.omg.sysml.adapter.ElementAdapter.transform(ElementAdapter.java:132)
	at org.omg.sysml.util.ElementUtil.transform(ElementUtil.java:379)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:359)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:363)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:363)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:363)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:363)
	at org.omg.sysml.util.ElementUtil.transformAll(ElementUtil.java:353)
	at org.omg.sysml.util.SysMLUtil.transformAll(SysMLUtil.java:301)
	at org.omg.kerml.xtext.util.KerML2XMI.write(KerML2XMI.java:113)
	at org.omg.kerml.xtext.util.KerML2XMI.run(KerML2XMI.java:212)
	at org.omg.sysml.xtext.util.SysML2XMI.main(SysML2XMI.java:81)

Copy link
Member

@himi himi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed it worked. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants