From a40446303f88982b70b1bb9350f7e190fe699ee4 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 7 Mar 2019 11:02:58 +1100 Subject: [PATCH] fix npe --- .../main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index 71142cb85..cbf40a2e4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -381,7 +381,9 @@ public abstract class BaseWorkerContext implements IWorkerContext { ValueSet result = txClient.expandValueset(vs, p, params); res = new ValueSetExpansionOutcome(result).setTxLink(txLog.getLastId()); } catch (Exception e) { - res = new ValueSetExpansionOutcome(e.getMessage() == null ? e.getClass().getName() : e.getMessage(), TerminologyServiceErrorClass.UNKNOWN).setTxLink(txLog.getLastId()); + res = new ValueSetExpansionOutcome(e.getMessage() == null ? e.getClass().getName() : e.getMessage(), TerminologyServiceErrorClass.UNKNOWN); + if (txLog != null) + res.setTxLink(txLog.getLastId()); } txCache.cacheExpansion(cacheToken, res, TerminologyCache.PERMANENT); return res;