diff --git a/matchbox-server/src/main/java/ch/ahdis/matchbox/mappinglanguage/StructureMapTransformProvider.java b/matchbox-server/src/main/java/ch/ahdis/matchbox/mappinglanguage/StructureMapTransformProvider.java index 386d696de73..970986f1ff7 100644 --- a/matchbox-server/src/main/java/ch/ahdis/matchbox/mappinglanguage/StructureMapTransformProvider.java +++ b/matchbox-server/src/main/java/ch/ahdis/matchbox/mappinglanguage/StructureMapTransformProvider.java @@ -156,15 +156,14 @@ public void transform(org.hl7.fhir.r5.model.StructureMap map, HttpServletRequest ServletOutputStream output = theServletResponse.getOutputStream(); try { if (output != null) { - if (output != null && responseContentType.equals(Constants.CT_FHIR_JSON_NEW)) + if (responseContentType.equals(Constants.CT_FHIR_JSON_NEW)) new org.hl7.fhir.r5.elementmodel.JsonParser(matchboxEngine.getContext()).compose(r, output, OutputStyle.PRETTY, null); else new org.hl7.fhir.r5.elementmodel.XmlParser(matchboxEngine.getContext()).compose(r, output, OutputStyle.PRETTY, null); } } catch(org.hl7.fhir.exceptions.FHIRException e) { log.error("Transform exception", e); - output.write("Exception during Transform: ".getBytes()); - output.write(e.getMessage().getBytes()); + output.write("Exception during Transform".getBytes()); } theServletResponse.getOutputStream().close(); } diff --git a/matchbox-server/src/main/java/ch/ahdis/matchbox/questionnaire/QuestionnaireResponseExtractProvider.java b/matchbox-server/src/main/java/ch/ahdis/matchbox/questionnaire/QuestionnaireResponseExtractProvider.java index 5f4266846fb..133f07b6bf0 100644 --- a/matchbox-server/src/main/java/ch/ahdis/matchbox/questionnaire/QuestionnaireResponseExtractProvider.java +++ b/matchbox-server/src/main/java/ch/ahdis/matchbox/questionnaire/QuestionnaireResponseExtractProvider.java @@ -102,15 +102,14 @@ public void extract(org.hl7.fhir.r5.elementmodel.Element src, HttpServletRequest ServletOutputStream output = theServletResponse.getOutputStream(); try { if (output != null) { - if (output != null && responseContentType.equals(Constants.CT_FHIR_JSON_NEW)) + if (responseContentType.equals(Constants.CT_FHIR_JSON_NEW)) new org.hl7.fhir.r5.elementmodel.JsonParser(matchboxEngine.getContext()).compose(r, output, OutputStyle.PRETTY, null); else new org.hl7.fhir.r5.elementmodel.XmlParser(matchboxEngine.getContext()).compose(r, output, OutputStyle.PRETTY, null); } } catch(org.hl7.fhir.exceptions.FHIRException e) { log.error("Transform exception", e); - output.write("Exception during Transform: ".getBytes()); - output.write(e.getMessage().getBytes()); + output.write("Exception during Transform".getBytes()); } theServletResponse.getOutputStream().close(); }