mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 22:34:42 +00:00
fix bug loading package
This commit is contained in:
parent
704d498300
commit
284ad1c2be
@ -42,7 +42,7 @@ public class CDARoundTripTests {
|
||||
context.loadFromFile(TestingUtilities.loadTestResourceStream("validator", "cda", "cda.xml"), "cda.xml", null);
|
||||
for (StructureDefinition sd : context.fetchResourcesByType(StructureDefinition.class)) {
|
||||
if (!sd.hasSnapshot()) {
|
||||
// System.out.println("generate snapshot for " + sd.getUrl());
|
||||
// System.out.println("generate snapshot for " + sd.getUrl());
|
||||
new ContextUtilities(context).generateSnapshot(sd, true);
|
||||
}
|
||||
}
|
||||
|
@ -361,10 +361,10 @@ public class NpmPackage {
|
||||
d = Utilities.path("package", d);
|
||||
}
|
||||
File ij = new File(Utilities.path(f.getAbsolutePath(), ".index.json"));
|
||||
if (ij.exists() || !minimalMemory) {
|
||||
NpmPackageFolder folder = this.new NpmPackageFolder(d);
|
||||
folder.folder = f;
|
||||
this.folders.put(d, folder);
|
||||
if (ij.exists() || !minimalMemory) {
|
||||
if (!minimalMemory) {
|
||||
try {
|
||||
if (!ij.exists() || !folder.readIndex(JsonParser.parseObject(ij), folder.getTypes())) {
|
||||
@ -397,21 +397,19 @@ public class NpmPackage {
|
||||
if (!d.startsWith("package")) {
|
||||
d = Utilities.path("package", d);
|
||||
}
|
||||
File ij = new File(Utilities.path(f.getAbsolutePath(), ".index.json"));
|
||||
if (ij.exists()) {
|
||||
NpmPackageFolder folder = this.new NpmPackageFolder(d);
|
||||
folder.folder = f;
|
||||
this.folders.put(d, folder);
|
||||
if (!minimalMemory) {
|
||||
File ij = new File(Utilities.path(f.getAbsolutePath(), ".index.json"));
|
||||
if (ij.exists() || !minimalMemory) {
|
||||
try {
|
||||
if (!folder.readIndex(JsonParser.parseObject(ij), folder.getTypes())) {
|
||||
if (!ij.exists() || !folder.readIndex(JsonParser.parseObject(ij), folder.getTypes())) {
|
||||
indexFolder(folder.getFolderName(), folder);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new IOException("Error parsing "+ij.getAbsolutePath()+": "+e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
loadSubFolders(rootPath, f);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user