Closed brlarson closed 4 years ago
The implementation of Aadl2LinkingService.getLinkedObjects()
assumes in many places that it is only called in the context of core AADL. The name resolution for references inside any annex must happen in an annex specific linking service.
The real bug is that the Aadl2LinkingService tries to resolve references inside an annex if
instead of just returning an empty list in these cases.
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