From c122a7379b57d45d2c994728171d20609842f7c5 Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 12 Aug 2009 23:43:27 +0000 Subject: Fix issues around XMLStreamWriter based on the isRepairingNamespaces property of XMLOutputFactory More refactoring to use common-xml and common-java git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803742 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/modules/definitions-xml/META-INF/MANIFEST.MF | 1 + .../tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'java/sca/modules/definitions-xml') diff --git a/java/sca/modules/definitions-xml/META-INF/MANIFEST.MF b/java/sca/modules/definitions-xml/META-INF/MANIFEST.MF index 682aacaf39..b9e4e04b91 100644 --- a/java/sca/modules/definitions-xml/META-INF/MANIFEST.MF +++ b/java/sca/modules/definitions-xml/META-INF/MANIFEST.MF @@ -12,6 +12,7 @@ Bundle-Description: Apache Tuscany SCA Definitions XML Model Import-Package: javax.xml.namespace, javax.xml.stream, org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.common.java.io;version="2.0.0", org.apache.tuscany.sca.contribution.processor;version="2.0.0", org.apache.tuscany.sca.contribution.resolver;version="2.0.0", org.apache.tuscany.sca.core;version="2.0.0", diff --git a/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java b/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java index 7213783478..3691212960 100644 --- a/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java +++ b/java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URL; -import java.net.URLConnection; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; @@ -33,6 +32,7 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; +import org.apache.tuscany.sca.common.java.io.IOHelper; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; @@ -103,9 +103,7 @@ public class DefinitionsDocumentProcessor implements URLArtifactProcessor() { public InputStream run() throws IOException { - URLConnection connection = url.openConnection(); - connection.setUseCaches(false); - return connection.getInputStream(); + return IOHelper.openStream(url); } }); } catch (PrivilegedActionException e) { -- cgit v1.2.3