summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/policy
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/policy')
-rw-r--r--java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java b/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java
index aace23edf6..2e4c6a9d78 100644
--- a/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java
+++ b/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java
@@ -341,10 +341,9 @@ public class PolicyComputationUtils {
}
}
- public static byte[] addApplicablePolicySets(InputStream is, Collection<PolicySet> domainPolicySets) throws Exception {
- DocumentBuilderFactory dbFac = DocumentBuilderFactory.newInstance();
- dbFac.setNamespaceAware(true);
- DocumentBuilder db = dbFac.newDocumentBuilder();
+ public static byte[] addApplicablePolicySets(InputStream is, Collection<PolicySet> domainPolicySets, DocumentBuilderFactory documentBuilderFactory) throws Exception {
+ documentBuilderFactory.setNamespaceAware(true);
+ DocumentBuilder db = documentBuilderFactory.newDocumentBuilder();
Document doc = db.parse(is);
is.close();
return addApplicablePolicySets(doc, domainPolicySets);