Fix NPEs
This commit is contained in:
parent
c6d1ff1fa0
commit
df71644ba5
|
@ -422,7 +422,7 @@ public class CodeSystemComparer extends CanonicalResourceComparer {
|
||||||
ConceptPropertyComponent cp = null;
|
ConceptPropertyComponent cp = null;
|
||||||
if (cd != null) {
|
if (cd != null) {
|
||||||
for (ConceptPropertyComponent t : cd.getProperty()) {
|
for (ConceptPropertyComponent t : cd.getProperty()) {
|
||||||
if (t.getCode().equals(c)) {
|
if (t.hasCode() && t.getCode().equals(c)) {
|
||||||
cp = t;
|
cp = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3800,6 +3800,9 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
if (contentReference.contains("#")) {
|
if (contentReference.contains("#")) {
|
||||||
String url = contentReference.substring(0, contentReference.indexOf("#"));
|
String url = contentReference.substring(0, contentReference.indexOf("#"));
|
||||||
contentReference = contentReference.substring(contentReference.indexOf("#"));
|
contentReference = contentReference.substring(contentReference.indexOf("#"));
|
||||||
|
if (Utilities.noString(url)) {
|
||||||
|
url = source.getUrl();
|
||||||
|
}
|
||||||
if (!url.equals(source.getUrl())) {
|
if (!url.equals(source.getUrl())) {
|
||||||
source = context.fetchResource(StructureDefinition.class, url);
|
source = context.fetchResource(StructureDefinition.class, url);
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
|
|
|
@ -490,11 +490,13 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
||||||
types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem", "Measures" };
|
types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem", "Measures" };
|
||||||
}
|
}
|
||||||
for (PackageResourceInformation pri : pi.listIndexedResources(types)) {
|
for (PackageResourceInformation pri : pi.listIndexedResources(types)) {
|
||||||
try {
|
if (!pri.getFilename().contains("ig-r4")) {
|
||||||
registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageVersion(pi.id(), pi.version(), pi.dateAsDate()));
|
try {
|
||||||
t++;
|
registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageVersion(pi.id(), pi.version(), pi.dateAsDate()));
|
||||||
} catch (FHIRException e) {
|
t++;
|
||||||
throw new FHIRException(formatMessage(I18nConstants.ERROR_READING__FROM_PACKAGE__, pri.getFilename(), pi.name(), pi.version(), e.getMessage()), e);
|
} catch (FHIRException e) {
|
||||||
|
throw new FHIRException(formatMessage(I18nConstants.ERROR_READING__FROM_PACKAGE__, pri.getFilename(), pi.name(), pi.version(), e.getMessage()), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue