From d1a785e5ad5a3218bec5d3ab96762f7151242d10 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Mon, 19 Jun 2023 22:40:08 +1000 Subject: [PATCH] only record sorting errors if debugging snapshot generation --- .../hl7/fhir/r5/conformance/profile/ProfileUtilities.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfileUtilities.java index 4758526db..39f2f408f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfileUtilities.java @@ -3174,7 +3174,7 @@ public class ProfileUtilities extends TranslatingUtilities { } if (mandatory) { if (prefixLength == 0) - errors.add("Differential contains path "+path+" which is not found in the in base "+baseName); + errors.add("Differential contains path "+path+" which is not found in the base "+baseName); else errors.add("Differential contains path "+path+" which is actually "+actual+", which is not found in the in base "+ baseName); } @@ -3293,7 +3293,9 @@ public class ProfileUtilities extends TranslatingUtilities { edh.getChildren().get(0).baseIndex = cmp.find(edh.getChildren().get(0).getSelf().getPath(), false); else Collections.sort(edh.getChildren(), cmp); - cmp.checkForErrors(errors); + if (debug) { + cmp.checkForErrors(errors); + } for (ElementDefinitionHolder child : edh.getChildren()) { if (child.getChildren().size() > 0) {