diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderObservation.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderObservation.java index 7bd541a95029..663eef88b1ce 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderObservation.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderObservation.java @@ -90,7 +90,7 @@ public IBundleProvider observationLastN( * has the "Observation" resource class defined. For this resource, the max parameter * is not supported and thus has to be removed before the use of "translateRawParameters". */ - theAdditionalRawParams.remove("max"); + if (theAdditionalRawParams != null) theAdditionalRawParams.remove("max"); } if (theCount != null) { paramMap.setCount(theCount.getValue());