From 955dbb2901cc3699d469cd19287efef4785f1abf Mon Sep 17 00:00:00 2001 From: Octavian Patrascoiu Date: Tue, 8 Aug 2023 16:06:28 +0100 Subject: [PATCH] Forward patch from 5.5.2. Force default DocumentBuilderFactory to improve performance --- .../src/main/java/com/gs/dmn/serialization/XMLUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dmn-runtime/src/main/java/com/gs/dmn/serialization/XMLUtil.java b/dmn-runtime/src/main/java/com/gs/dmn/serialization/XMLUtil.java index 2fedd4fa7..289b043d5 100644 --- a/dmn-runtime/src/main/java/com/gs/dmn/serialization/XMLUtil.java +++ b/dmn-runtime/src/main/java/com/gs/dmn/serialization/XMLUtil.java @@ -12,6 +12,7 @@ */ package com.gs.dmn.serialization; +import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,7 +24,8 @@ public class XMLUtil { private static final Logger LOGGER = LoggerFactory.getLogger(XMLUtil.class); public static DocumentBuilderFactory makeDocumentBuilderFactory() { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory dbf = new DocumentBuilderFactoryImpl(); + String attribute = null; try { attribute = XMLConstants.ACCESS_EXTERNAL_DTD;