Cut short traversal when finding top-level base references

This commit is contained in:
David Maplesden 2019-09-17 12:30:39 +12:00 committed by James Agnew
parent 4021fccf3b
commit 946f3a1732
1 changed files with 2 additions and 0 deletions

View File

@ -287,6 +287,8 @@ public abstract class BaseParser implements IParser {
protected void findBaseReferences(List<IBaseReference> allElements, IBase theElement, BaseRuntimeElementDefinition<?> theDefinition) {
if (theElement instanceof IBaseReference) {
allElements.add((IBaseReference) theElement);
// end traversal here, we recursively process nested resources later
return;
}
BaseRuntimeElementDefinition<?> def = theDefinition;