diff --git a/Src/java/cqf-fhir-npm/src/main/java/org/cqframework/fhir/npm/NpmPackageManager.java b/Src/java/cqf-fhir-npm/src/main/java/org/cqframework/fhir/npm/NpmPackageManager.java index de0534c56..1e139d07f 100644 --- a/Src/java/cqf-fhir-npm/src/main/java/org/cqframework/fhir/npm/NpmPackageManager.java +++ b/Src/java/cqf-fhir-npm/src/main/java/org/cqframework/fhir/npm/NpmPackageManager.java @@ -3,6 +3,7 @@ import ca.uhn.fhir.model.primitive.IdDt; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.hl7.fhir.r5.context.IWorkerContext; import org.hl7.fhir.r5.model.ImplementationGuide; @@ -29,23 +30,10 @@ public NpmPackageManager(ImplementationGuide sourceIg, FilesystemPackageCacheMan public NpmPackageManager( ImplementationGuide sourceIg, FilesystemPackageCacheManager fspcm, List npmList) { this.sourceIg = sourceIg; - - if (fspcm == null) { - try { - // userMode indicates whether the packageCache is within the working directory or in the user home - this.fspcm = new FilesystemPackageCacheManager(true); - } catch (IOException e) { - String message = "Error creating the FilesystemPackageCacheManager: " + e.getMessage(); - logErrorMessage(message); - throw new NpmPackageManagerException(message, e); - } - } else { - this.fspcm = fspcm; - } - this.npmList = npmList == null ? new ArrayList<>() : npmList; try { + this.fspcm = fspcm != null ? fspcm : new FilesystemPackageCacheManager.Builder().build(); loadDependencies(); } catch (Exception e) { logErrorMessage(e.getMessage()); diff --git a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java index b028c0c65..2fa6178e9 100644 --- a/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java +++ b/Src/java/cqf-fhir/src/main/java/org/cqframework/fhir/utilities/IGContext.java @@ -113,16 +113,17 @@ public void initializeFromIg(String rootDir, String igPath, String fhirVersion) * Initializes from an ig.ini file in the root directory */ public void initializeFromIni(String iniFile) { - IniFile ini = new IniFile(new File(iniFile).getAbsolutePath()); - String rootDir = Utilities.getDirectoryForFile(ini.getFileName()); - String igPath = ini.getStringProperty("IG", "ig"); - String specifiedFhirVersion = ini.getStringProperty("IG", "fhir-version"); - if (specifiedFhirVersion == null || specifiedFhirVersion == "") { - logMessage("fhir-version was not specified in the ini file. Trying FHIR version 4.0.1"); - specifiedFhirVersion = "4.0.1"; - } try { - initializeFromIg(rootDir, igPath, specifiedFhirVersion); + IniFile ini = new IniFile(new File(iniFile).getAbsolutePath()); + String iniDir = Utilities.getDirectoryForFile(ini.getFileName()); + String igPath = ini.getStringProperty("IG", "ig"); + String specifiedFhirVersion = ini.getStringProperty("IG", "fhir-version"); + if (specifiedFhirVersion == null || specifiedFhirVersion == "") { + logMessage("fhir-version was not specified in the ini file. Trying FHIR version 4.0.1"); + specifiedFhirVersion = "4.0.1"; + } + + initializeFromIg(iniDir, igPath, specifiedFhirVersion); } catch (Exception e) { String message = String.format( "Exceptions occurred initializing refresh from ini file '%s':%s", iniFile, e.getMessage()); diff --git a/Src/java/gradle.properties b/Src/java/gradle.properties index 65cc3529f..c29de375f 100644 --- a/Src/java/gradle.properties +++ b/Src/java/gradle.properties @@ -3,9 +3,9 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx4096m group=info.cqframework -version=3.15.0-SNAPSHOT +version=3.15.0 specification.version=1.5.2 -hapi.version=7.2.2 +hapi.version=7.4.0 jackson.version=2.16.1 antlr.version=4.13.1 android.api.level=28