public void retainImplicitlyReferencedObjects() { for (LocalContent item : localizer.getLocalContentItems()) { if (item.isRetained()) { if (item.getSectionType() == ObjectType.PATH && item.isRetained()) { getRequiredSecuritySchemesFromPath(item).forEach(LocalContent::retain); } } else if (item.getSectionType() == ObjectType.SECURITY_SCHEME) { item.retain(); } } }