From ebf706b837ea8c1c9cf96641e1e1e5796fa09d19 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Mon, 18 Sep 2023 17:06:31 +1000 Subject: [PATCH] Fix NPE in version comparison --- .../java/org/hl7/fhir/r5/comparison/ComparisonSession.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonSession.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonSession.java index 3c05b67dc..94745f47b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonSession.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/ComparisonSession.java @@ -180,6 +180,9 @@ public class ComparisonSession { } private VersionComparisonAnnotation getAnnotation(Base b) { + if (b == null) { + return null; + } if (b.hasUserData(VersionComparisonAnnotation.USER_DATA_NAME)) { return (VersionComparisonAnnotation) b.getUserData(VersionComparisonAnnotation.USER_DATA_NAME); } else {