Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Resources with null extensions causes NullPointerException when encoding to XML/JSON #312
When nulls are inadvertently added to a Resource extension list, a NullPointerException is triggered when encoding the Resource to XML/JSON.
This happens when using org.hl7.fhir.convertors.CCDAConverter. Line 307 for example:
Factory.newExtension occasionally returns null. When the Resource is encoded to XML/JSON, a NullPointerException is triggered.
Here's a test code (in Groovy):
Here's the stacktrace: