summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/util/TestTempJarCache.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-29 04:59:42 +0100
committerSven Gothel <[email protected]>2011-11-29 04:59:42 +0100
commit04391a3f417e10e1b6dafbd8becc63659af633c3 (patch)
tree2b9a5f8dc81b7631d34d306894387d3bac4b9bec /src/junit/com/jogamp/common/util/TestTempJarCache.java
parent60ea6727f1a089f6afd17fcea3bd7d29353af9b4 (diff)
JarUtil: Improve Robustness (Bug 522) and API doc, prepare for Jar-In-Jar. Add unit test.
Misc.: - IOUtil: Add toURL* methods - TempJarCache: Add 'URL getResource(String)'
Diffstat (limited to 'src/junit/com/jogamp/common/util/TestTempJarCache.java')
-rw-r--r--src/junit/com/jogamp/common/util/TestTempJarCache.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java
index e1e47af..199d0aa 100644
--- a/src/junit/com/jogamp/common/util/TestTempJarCache.java
+++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java
@@ -137,7 +137,7 @@ public class TestTempJarCache {
@Test
public void testJarUtil01a() throws IOException {
JarFile jarFile = JarUtil.getJarFile(GlueGenVersion.class.getName(), this.getClass().getClassLoader());
- Assert.assertNotNull("jarFile: "+jarFile);
+ Assert.assertNotNull(jarFile);
JarUtil.extract(fileCache.getTempDir(), null, jarFile, false, true, true);
File f = new File(fileCache.getTempDir(), "META-INF/MANIFEST.MF");
Assert.assertTrue(f.exists());
@@ -185,10 +185,10 @@ public class TestTempJarCache {
final String libBaseName = "gluegen-rt";
final ClassLoader cl = getClass().getClassLoader();
- URL jarUrlRoot = JarUtil.getJarURL(TempJarCache.class.getName(), cl);
- jarUrlRoot = JarUtil.getJarURLDirname(jarUrlRoot);
+ URL jarUrlRoot = JarUtil.getJarSubURL(TempJarCache.class.getName(), cl);
+ jarUrlRoot = JarUtil.getURLDirname(jarUrlRoot);
- URL nativeJarURL = JarUtil.getJarURL(jarUrlRoot, nativeJarName);
+ URL nativeJarURL = JarUtil.getJarFileURL(jarUrlRoot, nativeJarName);
JarFile nativeJar = JarUtil.getJarFile(nativeJarURL, cl);
TempJarCache.addNativeLibs(TempJarCache.class, nativeJar);
@@ -225,7 +225,7 @@ public class TestTempJarCache {
@Test
public void testTempJarCache04bDiffClassLoader() throws IOException {
- URL[] urls = new URL[] { JarUtil.getJarURL(TempJarCache.class.getName(), getClass().getClassLoader()) };
+ URL[] urls = new URL[] { JarUtil.getJarFileURL(TempJarCache.class.getName(), getClass().getClassLoader()) };
System.err.println("url: "+urls[0]);
ClassLoader cl2 = new TestClassLoader(urls, null);
ClassLoader cl3 = new TestClassLoader(urls, null);