diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-15 22:07:43 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-15 22:07:43 +0000 |
commit | b260755836736d405f104bfc14111cb9d51f8118 (patch) | |
tree | bb7eb118adeef50761cf6b72bb6b789251d78f88 /java/sca/modules/policy/src | |
parent | 1c22b82f37a62e40036cd8fdf70918fd7fc93bd0 (diff) |
Port DefaultSCADomain to use SCA Node impl
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686391 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/policy/src')
-rw-r--r-- | java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/util/PolicyComputationUtils.java | 7 |
1 files changed, 4 insertions, 3 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 1c56cbacbc..aace23edf6 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 @@ -21,8 +21,8 @@ package org.apache.tuscany.sca.policy.util; import static javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI; +import java.io.InputStream; import java.io.StringWriter; -import java.net.URL; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; @@ -341,11 +341,12 @@ public class PolicyComputationUtils { } } - public static byte[] addApplicablePolicySets(URL artifactUrl, Collection<PolicySet> domainPolicySets) throws Exception { + public static byte[] addApplicablePolicySets(InputStream is, Collection<PolicySet> domainPolicySets) throws Exception { DocumentBuilderFactory dbFac = DocumentBuilderFactory.newInstance(); dbFac.setNamespaceAware(true); DocumentBuilder db = dbFac.newDocumentBuilder(); - Document doc = db.parse(artifactUrl.toURI().toString()); + Document doc = db.parse(is); + is.close(); return addApplicablePolicySets(doc, domainPolicySets); } |