From f6a913effe65e6d0d275c82288f0eebf519f448b Mon Sep 17 00:00:00 2001 From: Tadgh Date: Thu, 25 Feb 2021 09:27:28 -0500 Subject: [PATCH] Fix NPE --- .../ca/uhn/fhir/jpa/bulk/svc/BulkDataExportSvcImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/svc/BulkDataExportSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/svc/BulkDataExportSvcImpl.java index e0bf38c0a89..7003f49e740 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/svc/BulkDataExportSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/bulk/svc/BulkDataExportSvcImpl.java @@ -158,7 +158,13 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc { } private String getGroupIdIfPresent(String theRequestString) { Map stringMap = UrlUtil.parseQueryString(theRequestString); - return String.join(",", stringMap.get(JpaConstants.PARAM_EXPORT_GROUP_ID)); + if (stringMap != null) { + String[] strings = stringMap.get(JpaConstants.PARAM_EXPORT_GROUP_ID); + if (strings != null) { + return String.join(",", strings); + } + } + return null; }