Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2009-04-02 21:19:04 +0000
committerJohn Arthorne2009-04-02 21:19:04 +0000
commit096027ef82eff23fb8117ae2e3b575f4debdcf2e (patch)
tree109a8c17e08887f754590fc9e4e10e5cbae52ab3 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
parentd294e8376da74f380fee462158b776d0807b039c (diff)
downloadrt.equinox.p2-096027ef82eff23fb8117ae2e3b575f4debdcf2e.tar.gz
rt.equinox.p2-096027ef82eff23fb8117ae2e3b575f4debdcf2e.tar.xz
rt.equinox.p2-096027ef82eff23fb8117ae2e3b575f4debdcf2e.zip
Bug 271058 Remove deprecated Transport method
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
index 0679b3956..c8d9fb360 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
@@ -20,7 +20,7 @@ import org.osgi.framework.BundleException;
public class TransferTest extends AbstractProvisioningTest {
- public void testGZFileAreNotUnzipped() {
+ public void testGZFileAreNotUnzipped() throws URISyntaxException {
FileOutputStream fos = null;
File f = null;
try {
@@ -32,12 +32,13 @@ public class TransferTest extends AbstractProvisioningTest {
} catch (BundleException e) {
fail("1.5", e);
}
- IStatus s = RepositoryTransport.getInstance().download("http://download.eclipse.org/eclipse/updates/3.4/plugins/javax.servlet.jsp_2.0.0.v200806031607.jar.pack.gz", fos, new NullProgressMonitor());
+ final URI toDownload = new URI("http://download.eclipse.org/eclipse/updates/3.4/plugins/javax.servlet.jsp_2.0.0.v200806031607.jar.pack.gz");
+ IStatus s = RepositoryTransport.getInstance().download(toDownload, fos, new NullProgressMonitor());
assertOK("2.0", s);
int httpSize = -1;
URL u;
try {
- u = new URL("http://download.eclipse.org/eclipse/updates/3.4/plugins/javax.servlet.jsp_2.0.0.v200806031607.jar.pack.gz");
+ u = toDownload.toURL();
HttpURLConnection c = (HttpURLConnection) u.openConnection();
httpSize = c.getContentLength();
} catch (MalformedURLException e1) {

Back to the top