From a47ac539a54cb903bf0fdcb466135eb98b170e66 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 9 Sep 2020 11:51:09 +1000 Subject: [PATCH] Fix bug loading implied packages with no version --- .../main/java/org/hl7/fhir/utilities/cache/PackageClient.java | 2 +- .../org/hl7/fhir/validation/tests/ValidationTestSuite.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageClient.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageClient.java index f384d2f2e..ac1457b08 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageClient.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/cache/PackageClient.java @@ -86,7 +86,7 @@ public class PackageClient { public boolean exists(String id, String ver) throws IOException { List vl = getVersions(id); for (PackageInfo pi : vl) { - if (ver.equals(pi.getVersion())) { + if (ver == null || ver.equals(pi.getVersion())) { return true; } } diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java index 2f9e1ca9a..1f22b1d44 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java @@ -371,9 +371,6 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour } if (!TestingUtilities.context(version).isNoTerminologyServer() || !focus.has("tx-dependent")) { Assert.assertEquals("Test " + name + (profile == null ? "" : " profile: "+ profile) + ": Expected " + Integer.toString(java.get("errorCount").getAsInt()) + " errors, but found " + Integer.toString(ec) + ".", java.get("errorCount").getAsInt(), ec); - if (name.equals("icd-9-condition.xml")) { - Assert.assertEquals("Test " + name + (profile == null ? "" : " profile: "+ profile) + ": Expected " + Integer.toString(1) + " errors, but found " + Integer.toString(ec) + ".", 1, ec); - } if (java.has("warningCount")) { Assert.assertEquals( "Test " + name + (profile == null ? "" : " profile: "+ profile) + ": Expected " + Integer.toString(java.get("warningCount").getAsInt()) + " warnings, but found " + Integer.toString(wc) + ".", java.get("warningCount").getAsInt(), wc); }