summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/definitions-xml
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/definitions-xml')
-rw-r--r--java/sca/modules/definitions-xml/META-INF/MANIFEST.MF1
-rw-r--r--java/sca/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsDocumentProcessor.java6
2 files changed, 3 insertions, 4 deletions
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<Defini
try {
urlStream = AccessController.doPrivileged(new PrivilegedExceptionAction<InputStream>() {
public InputStream run() throws IOException {
- URLConnection connection = url.openConnection();
- connection.setUseCaches(false);
- return connection.getInputStream();
+ return IOHelper.openStream(url);
}
});
} catch (PrivilegedActionException e) {