|
|
@ -153,12 +153,13 @@ public class JarURLConnectionTests {
|
|
|
|
.hasSameContentAs(new ByteArrayInputStream(new byte[] { 3 }));
|
|
|
|
.hasSameContentAs(new ByteArrayInputStream(new byte[] { 3 }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test(expected = FileNotFoundException.class)
|
|
|
|
@Test
|
|
|
|
public void connectionToEntryUsingWrongAbsoluteUrlForEntryFromNestedJarFile()
|
|
|
|
public void connectionToEntryUsingWrongAbsoluteUrlForEntryFromNestedJarFile()
|
|
|
|
throws Exception {
|
|
|
|
throws Exception {
|
|
|
|
URL url = new URL("jar:file:" + getAbsolutePath() + "!/w.jar!/3.dat");
|
|
|
|
URL url = new URL("jar:file:" + getAbsolutePath() + "!/w.jar!/3.dat");
|
|
|
|
JarFile nested = this.jarFile
|
|
|
|
JarFile nested = this.jarFile
|
|
|
|
.getNestedJarFile(this.jarFile.getEntry("nested.jar"));
|
|
|
|
.getNestedJarFile(this.jarFile.getEntry("nested.jar"));
|
|
|
|
|
|
|
|
this.thrown.expect(FileNotFoundException.class);
|
|
|
|
JarURLConnection.get(url, nested).getInputStream();
|
|
|
|
JarURLConnection.get(url, nested).getInputStream();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|