Summary
When linking inside an annex library, a NullPointerException is thrown because
line 224: aadl Classifier ns = AadlUtil.getContainingClassifier(context);
returns null, because there is no containing classifier for an annex library.
Please check for (ns != null) before use and return an empty list instead (line 249)
if (ns != null)
{
EObject searchResult = AadlUtil.findNamedElementInList(ns.getAllFeatures(), name);
if (searchResult != null && searchResult instanceof Port)
{
return Collections.singletonList(searchResult);
}
}
return Collections.<EObject> emptyList();
Environment
- OSATE Version: 2.6.1
- Operating System: macOS 10.14.6
Summary
When linking inside an annex library, a NullPointerException is thrown because
line 224:
aadl Classifier ns = AadlUtil.getContainingClassifier(context);returns null, because there is no containing classifier for an annex library.
Please check for (ns != null) before use and return an empty list instead (line 249)
Environment