From 03473a585a1cf0e0adc37521f570cf7a1b5ea2bd Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Fri, 6 Dec 2019 11:12:47 +0100 Subject: [PATCH 1/2] merged 2 if statement into 1 --- .../main/java/org/hl7/fhir/r5/validation/ValidationEngine.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java index 0f024b33f..6a6b395d7 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/r5/validation/ValidationEngine.java @@ -595,8 +595,7 @@ public class ValidationEngine implements IValidatorResourceFetcher { private Map scanDirectory(File f, boolean recursive) throws FileNotFoundException, IOException { Map res = new HashMap<>(); for (File ff : f.listFiles()) { - if (ff.isDirectory()){ - if (recursive) + if (ff.isDirectory() && recursive){ res.putAll(scanDirectory(ff, true)); } else if (!isIgnoreFile(ff)) { From aaf6cb2f2525782c432eeede26b32149fff72117 Mon Sep 17 00:00:00 2001 From: patrick-werner Date: Fri, 6 Dec 2019 13:42:01 +0100 Subject: [PATCH 2/2] fixed typo --- .../java/org/hl7/fhir/r5/context/BaseWorkerContext.java | 6 +++--- .../main/java/org/hl7/fhir/r5/context/IWorkerContext.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index adc4eaeb0..a244205d2 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -415,18 +415,18 @@ public abstract class BaseWorkerContext implements IWorkerContext { } @Override - public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean heirachical) throws TerminologyServiceException { + public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean hierarchical) throws TerminologyServiceException { ValueSet vs = new ValueSet(); vs.setCompose(new ValueSetComposeComponent()); vs.getCompose().getInclude().add(inc); - CacheToken cacheToken = txCache.generateExpandToken(vs, heirachical); + CacheToken cacheToken = txCache.generateExpandToken(vs, hierarchical); ValueSetExpansionOutcome res; res = txCache.getExpansion(cacheToken); if (res != null) return res; Parameters p = expParameters.copy(); p.setParameter("includeDefinition", false); - p.setParameter("excludeNested", !heirachical); + p.setParameter("excludeNested", !hierarchical); if (noTerminologyServer) return new ValueSetExpansionOutcome("Error expanding ValueSet: running without terminology services", TerminologyServiceErrorClass.NOSERVICE); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java index 6d04f3731..cff885a58 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java @@ -281,7 +281,7 @@ public interface IWorkerContext { * @return * @throws FHIRException */ - public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException; + public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean hierarchical) throws TerminologyServiceException; public class ValidationResult { private ConceptDefinitionComponent definition;