do not use loadPackageFromCacheOnly from outside cache manager
This commit is contained in:
parent
0a03628e97
commit
837aa319c0
|
@ -472,7 +472,7 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
|
|||
* @throws IOException If the package cannot be loaded
|
||||
*/
|
||||
@Override
|
||||
public NpmPackage loadPackageFromCacheOnly(String id, String version) throws IOException {
|
||||
public NpmPackage loadPackageFromCacheOnly(String id, @Nullable String version) throws IOException {
|
||||
|
||||
if (!Utilities.noString(version) && version.startsWith("file:")) {
|
||||
return loadPackageFromFile(id, version.substring(5));
|
||||
|
|
|
@ -518,9 +518,9 @@ public class IgLoader implements IValidationEngineLoader {
|
|||
if (pi != null)
|
||||
System.out.println(" ... Using version " + pi.version());
|
||||
} else
|
||||
pi = getPackageCacheManager().loadPackageFromCacheOnly(id, version);
|
||||
pi = getPackageCacheManager().loadPackage(id, version);
|
||||
if (pi == null) {
|
||||
return resolvePackage(id, version, loadInContext);
|
||||
throw new FHIRException("Unable to find package "+src);
|
||||
} else
|
||||
return loadPackage(pi, loadInContext);
|
||||
}
|
||||
|
@ -670,9 +670,9 @@ public class IgLoader implements IValidationEngineLoader {
|
|||
if (pi != null)
|
||||
System.out.println(" ... Using version " + pi.version());
|
||||
} else
|
||||
pi = getPackageCacheManager().loadPackageFromCacheOnly(id, version);
|
||||
pi = getPackageCacheManager().loadPackage(id, version);
|
||||
if (pi == null) {
|
||||
return resolvePackageForVersion(id, version);
|
||||
throw new FHIRException("Unable to resolve package "+src);
|
||||
} else {
|
||||
return pi.fhirVersion();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue