Fix bug loading packages in non-database mode (#3199)
* Add implementation * Add changelog
This commit is contained in:
parent
3363807931
commit
7ef1d159ee
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
type: change
|
||||||
|
issue: 3198
|
||||||
|
jira: SMILE-3452
|
||||||
|
title: "Fixed a regression where packages would fail to load if HAPI-FHIR was operating in DATABASE binary storage mode."
|
|
@ -28,6 +28,7 @@ import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||||
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||||
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
|
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
|
||||||
import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc;
|
import ca.uhn.fhir.jpa.binstore.IBinaryStorageSvc;
|
||||||
|
import ca.uhn.fhir.jpa.binstore.NullBinaryStorageSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.dao.data.INpmPackageDao;
|
import ca.uhn.fhir.jpa.dao.data.INpmPackageDao;
|
||||||
import ca.uhn.fhir.jpa.dao.data.INpmPackageVersionDao;
|
import ca.uhn.fhir.jpa.dao.data.INpmPackageVersionDao;
|
||||||
import ca.uhn.fhir.jpa.dao.data.INpmPackageVersionResourceDao;
|
import ca.uhn.fhir.jpa.dao.data.INpmPackageVersionResourceDao;
|
||||||
|
@ -198,7 +199,7 @@ public class JpaPackageCache extends BasePackageCacheManager implements IHapiPac
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private byte[] fetchBlobFromBinary(IBaseBinary theBinary) throws IOException {
|
private byte[] fetchBlobFromBinary(IBaseBinary theBinary) throws IOException {
|
||||||
if (myBinaryStorageSvc != null) {
|
if (myBinaryStorageSvc != null && !(myBinaryStorageSvc instanceof NullBinaryStorageSvcImpl)) {
|
||||||
return myBinaryStorageSvc.fetchDataBlobFromBinary(theBinary);
|
return myBinaryStorageSvc.fetchDataBlobFromBinary(theBinary);
|
||||||
} else {
|
} else {
|
||||||
byte[] value = BinaryUtil.getOrCreateData(myCtx, theBinary).getValue();
|
byte[] value = BinaryUtil.getOrCreateData(myCtx, theBinary).getValue();
|
||||||
|
|
Loading…
Reference in New Issue