Fix for NPE processing packages

This commit is contained in:
Grahame Grieve 2024-09-12 11:56:04 +08:00
parent 8056dced3e
commit 07f1981a8c
3 changed files with 7 additions and 5 deletions

View File

@ -3431,7 +3431,7 @@ public class StructureDefinitionRenderer extends ResourceRenderer {
sdMapCache.put(url, sdCache);
String webroot = sd.getUserString("webroot");
for (ElementDefinition e : sd.getSnapshot().getElement()) {
context.getProfileUtilities().updateURLs(sd.getUrl(), webroot, e);
context.getProfileUtilities().updateURLs(sd.getUrl(), webroot, e, false);
sdCache.put(e.getId(), e);
}
}

View File

@ -237,9 +237,11 @@ public class NpmPackage {
public List<String> listFiles() {
List<String> res = new ArrayList<>();
if (folder != null) {
for (File f : folder.listFiles()) {
if (!f.isDirectory() && !Utilities.existsInList(f.getName(), "package.json", ".index.json", ".index.db", ".oids.json", ".oids.db")) {
res.add(f.getName());
if (folder.exists()) {
for (File f : folder.listFiles()) {
if (!f.isDirectory() && !Utilities.existsInList(f.getName(), "package.json", ".index.json", ".index.db", ".oids.json", ".oids.db")) {
res.add(f.getName());
}
}
}
} else {

View File

@ -21,7 +21,7 @@
<commons_compress_version>1.26.0</commons_compress_version>
<guava_version>32.0.1-jre</guava_version>
<hapi_fhir_version>6.4.1</hapi_fhir_version>
<validator_test_case_version>1.5.21</validator_test_case_version>
<validator_test_case_version>1.5.22-SNAPSHOT</validator_test_case_version>
<jackson_version>2.17.0</jackson_version>
<junit_jupiter_version>5.9.2</junit_jupiter_version>
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>