summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-09 05:33:16 +0200
committerSven Gothel <[email protected]>2013-06-09 05:33:16 +0200
commitb98825eb7cfb61aead4a7dff57471cd2d2c26823 (patch)
tree8190c7eaac697e4150e47424dc975be512a3979d /src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
parent959d6d83ec26152343d538287c02eeebf0dcf238 (diff)
Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL to remove DNS Lookups etc ..
Diffstat (limited to 'src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java')
-rw-r--r--src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java b/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
index cf26da4..be32c98 100644
--- a/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
+++ b/src/junit/com/jogamp/common/net/AssetURLConnectionUnregisteredTest.java
@@ -1,6 +1,8 @@
package com.jogamp.common.net;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
@@ -32,17 +34,17 @@ public class AssetURLConnectionUnregisteredTest extends AssetURLConnectionBase {
}
@Test
- public void assetUnregisteredIOUtilGetResourceRel0_RT() throws IOException {
+ public void assetUnregisteredIOUtilGetResourceRel0_RT() throws IOException, URISyntaxException {
final URLConnection urlConn0 = IOUtil.getResource(this.getClass(), test_asset_test2_rel);
testAssetConnection(urlConn0, test_asset_test2_entry);
- final URL url1 = IOUtil.getRelativeOf(urlConn0.getURL(), test_asset_test3_rel);
- Assert.assertNotNull(url1); // JARFile URL ..
- testAssetConnection(url1.openConnection(), test_asset_test3_entry);
+ final URI uri1 = IOUtil.getRelativeOf(urlConn0.getURL().toURI(), test_asset_test3_rel);
+ Assert.assertNotNull(uri1); // JARFile URL ..
+ testAssetConnection(uri1.toURL().openConnection(), test_asset_test3_entry);
- final URL url2 = IOUtil.getRelativeOf(urlConn0.getURL(), test_asset_test4_rel);
- Assert.assertNotNull(url1);
- testAssetConnection(url2.openConnection(), test_asset_test4_entry);
+ final URI uri2 = IOUtil.getRelativeOf(urlConn0.getURL().toURI(), test_asset_test4_rel);
+ Assert.assertNotNull(uri2);
+ testAssetConnection(uri2.toURL().openConnection(), test_asset_test4_entry);
}
protected static URLConnection createAssetURLConnection(String path, ClassLoader cl) throws IOException {