Protect against malformed URLs on Windows

Update JarFile to correctly create system independent URLs to prevent
potential URISyntaxExceptions when running on Windows.

Fixes gh-836
This commit is contained in:
Phillip Webb
2014-05-16 14:17:26 +01:00
parent 845a86d548
commit 6a644e2e23
2 changed files with 36 additions and 13 deletions

View File

@@ -92,7 +92,6 @@ public class JarFileTests {
assertThat(urlClassLoader.getResource("special/\u00EB.dat"), notNullValue());
assertThat(urlClassLoader.getResource("d/9.dat"), notNullValue());
jarFile.close();
urlClassLoader.close();
}
@Test
@@ -135,7 +134,6 @@ public class JarFileTests {
URLClassLoader urlClassLoader = new URLClassLoader(
new URL[] { this.jarFile.getUrl() });
assertThat(urlClassLoader.getResource("special/\u00EB.dat"), notNullValue());
urlClassLoader.close();
}
@Test