diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/IgInstallerDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/IgInstallerDstu3Test.java index 1e2d68d08fc..1324ac3644a 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/IgInstallerDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/packages/IgInstallerDstu3Test.java @@ -75,12 +75,12 @@ public class IgInstallerDstu3Test extends BaseJpaDstu3Test { byte[] bytes = loadResourceAsByteArray("/packages/erroneous-ig.tar.gz"); - // Unknown base of StructureDefinitions + // That patient profile in this NPM package has an invalid base try { igInstaller.install(new PackageInstallationSpec().setName("erroneous-ig").setVersion("1.0.2").setInstallMode(PackageInstallationSpec.InstallModeEnum.STORE_AND_INSTALL).setPackageContents(bytes)); fail(); } catch (ImplementationGuideInstallationException e) { - assertThat(e.getMessage(), containsString("Failure when generating snapshot of StructureDefinition")); + assertThat(e.getMessage(), containsString("Could not load NPM package erroneous-ig#1.0.2")); } } diff --git a/hapi-fhir-jpaserver-base/src/test/resources/packages/erroneous-ig.tar.gz b/hapi-fhir-jpaserver-base/src/test/resources/packages/erroneous-ig.tar.gz index c0d87b07b6c..404f4905ec2 100644 Binary files a/hapi-fhir-jpaserver-base/src/test/resources/packages/erroneous-ig.tar.gz and b/hapi-fhir-jpaserver-base/src/test/resources/packages/erroneous-ig.tar.gz differ diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java index d18a4d11d40..355e5b54ee2 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorR5.java @@ -88,7 +88,7 @@ public class SearchParamExtractorR5 extends BaseSearchParamExtractor implements private final Map myResourceTypeToStub = Collections.synchronizedMap(new HashMap<>()); @Override - public Base resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { + public List resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { return null; } diff --git a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java index 06d22963f65..ba66b4937d3 100644 --- a/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java +++ b/hapi-fhir-structures-r5/src/main/java/org/hl7/fhir/r5/hapi/ctx/HapiWorkerContext.java @@ -189,7 +189,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext severity = IssueSeverity.fromCode(result.getSeverityCode()); } ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode()); - return new ValidationResult(severity, result.getMessage(), definition); + return new ValidationResult(severity, result.getMessage(), theSystem, definition); } @Override @@ -206,7 +206,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext ConceptDefinitionComponent definition = new ConceptDefinitionComponent(); definition.setCode(theCode); definition.setDisplay(outcome.getDisplay()); - return new ValidationResult(definition); + return new ValidationResult(theSystem, definition); } return new ValidationResult(IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" + Constants.codeSystemWithDefaultDescription(theSystem) + "]"); diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java index f673e2fda01..384ff09111e 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/FhirInstanceValidator.java @@ -274,9 +274,10 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IInsta public static class NullEvaluationContext implements FHIRPathEngine.IEvaluationContext { + @Override - public Base resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { - return null; + public List resolveConstant(Object appContext, String name, boolean beforeContext) throws PathEngineException { + return Collections.emptyList(); } @Override diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java index 33233b1ae87..c402b9b8dfd 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/validator/VersionSpecificWorkerContextWrapper.java @@ -247,7 +247,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo } @Nonnull - private ValidationResult convertValidationResult(@Nullable IValidationSupport.CodeValidationResult theResult) { + private ValidationResult convertValidationResult(String theSystem, @Nullable IValidationSupport.CodeValidationResult theResult) { ValidationResult retVal = null; if (theResult != null) { String code = theResult.getCode(); @@ -255,7 +255,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo String issueSeverity = theResult.getSeverityCode(); String message = theResult.getMessage(); if (isNotBlank(code)) { - retVal = new ValidationResult(new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent() + retVal = new ValidationResult(theSystem, new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent() .setCode(code) .setDisplay(display)); } else if (isNotBlank(issueSeverity)) { @@ -589,7 +589,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo } else { result = myValidationSupportContext.getRootValidationSupport().validateCode(myValidationSupportContext, theValidationOptions, theSystem, theCode, theDisplay, null); } - return convertValidationResult(result); + return convertValidationResult(theSystem, result); } @Override diff --git a/pom.xml b/pom.xml index 5ba93f0789a..3cf52de46e0 100644 --- a/pom.xml +++ b/pom.xml @@ -759,7 +759,7 @@ - 5.4.10 + 5.5.4 1.0.3 -Dfile.encoding=UTF-8 -Xmx2048m