Revert "Omit jar: prefix from jarFileUrl"

Restore previous behavior where JarFile URLs are always prefixed with
"jar:". I believe that the prefix is required in order to remain
compatible with standard JAR URLs.

This reverts commit 825fc2f7df.
This commit is contained in:
Phillip Webb
2014-02-24 13:44:09 -08:00
parent cf23b519d2
commit 865c51d7ac
2 changed files with 5 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ public class JarFileTests {
assertThat(jarURLConnection.getContentLength(), greaterThan(1));
assertThat(jarURLConnection.getContent(), sameInstance((Object) this.jarFile));
assertThat(jarURLConnection.getContentType(), equalTo("x-java/jar"));
assertThat(jarURLConnection.getJarFileURL().toString(), equalTo("file:"
assertThat(jarURLConnection.getJarFileURL().toString(), equalTo("jar:file:"
+ this.rootJarFile));
}
@@ -216,8 +216,8 @@ public class JarFileTests {
+ "!/nested.jar!/"));
JarURLConnection conn = (JarURLConnection) url.openConnection();
assertThat(conn.getJarFile(), sameInstance(nestedJarFile));
assertThat(conn.getJarFileURL().toString(),
equalTo("file:" + this.rootJarFile.getPath() + "!/nested.jar"));
assertThat(conn.getJarFileURL().toString(), equalTo("jar:file:"
+ this.rootJarFile.getPath() + "!/nested.jar"));
}
@Test