hapi-fhir icon indicating copy to clipboard operation
hapi-fhir copied to clipboard

Subscriptions with null content cause NullPointerException

Open dotasek opened this issue 11 months ago • 0 comments

Description

A Subscription with content set to null will cause the getPayloadByContent method to throw a NullPointerException.

To Reproduce

Check out the rel_7_1_tracking branch of HAPI FHIR JPA Server Starter (https://github.com/hapifhir/hapi-fhir-jpaserver-starter/tree/rel_7_1_tracking)

In an IDE, find and run ca.uhn.fhir.jpa.starter.ExampleServerR5IT.testWebsocketSubscription. It will fail, with the root cause being a NullPointerException.

Expected behavior

If the content is an actual null, it should not fail, and return Optional.empty().

dotasek avatar Mar 11 '24 14:03 dotasek