WIP cherry-pick fix for NPE in IGLoader

This commit is contained in:
dotasek 2024-08-22 13:36:54 -04:00
parent 02c48f7ba6
commit ee3024c1b7
1 changed files with 6 additions and 4 deletions

View File

@ -497,10 +497,12 @@ public class IgLoader implements IValidationEngineLoader {
private Map<String, ByteProvider> fetchByPackage(String src, boolean loadInContext) throws FHIRException, IOException { private Map<String, ByteProvider> fetchByPackage(String src, boolean loadInContext) throws FHIRException, IOException {
NpmPackage pi; NpmPackage pi;
InputStream stream = directProvider.fetchByPackage(src); if (directProvider != null) {
if (stream != null) { InputStream stream = directProvider.fetchByPackage(src);
pi = NpmPackage.fromPackage(stream); if (stream != null) {
return loadPackage(pi, loadInContext); pi = NpmPackage.fromPackage(stream);
return loadPackage(pi, loadInContext);
}
} }
String id = src; String id = src;
String version = null; String version = null;