diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/BearerTokenAuthInterceptorTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/BearerTokenAuthInterceptorTest.java index b1e99b1e208..1b19341d993 100644 --- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/BearerTokenAuthInterceptorTest.java +++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/rest/client/BearerTokenAuthInterceptorTest.java @@ -39,7 +39,7 @@ public class BearerTokenAuthInterceptorTest { public void before() { myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs()); ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient); - ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER); + ourCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs()); } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/ca/uhn/fhir/validation/FhirInstanceValidator.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/ca/uhn/fhir/validation/FhirInstanceValidator.java index 5c6b9d13320..e0e34ac578f 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/ca/uhn/fhir/validation/FhirInstanceValidator.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/ca/uhn/fhir/validation/FhirInstanceValidator.java @@ -189,6 +189,13 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid throw new IllegalArgumentException("Unknown encoding: " + theEncoding); } + for (int i = 0; i < messages.size(); i++) { + ValidationMessage next = messages.get(i); + if ("Binding has no source, so can't be checked".equals(next.getMessage())) { + messages.remove(i); + i--; + } + } return messages; } diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorTest.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorTest.java index 86e1deea8e0..5b41a7c1f09 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorTest.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/validation/FhirInstanceValidatorTest.java @@ -230,7 +230,7 @@ public class FhirInstanceValidatorTest { .toString(FhirInstanceValidator.class.getResourceAsStream("/medicationstatement_invalidelement.xml")); ValidationResult output = myVal.validateWithResult(input); - List res = logResultsAndReturnNonInformationalOnes(output); + List res = logResultsAndReturnAll(output); ourLog.info(res.toString()); for (SingleValidationMessage nextMessage : res) {