diff --git a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java index cc6eb8f2e2..73fe6eeefb 100644 --- a/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java +++ b/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/JarFileTests.java @@ -313,14 +313,13 @@ public class JarFileTests { @Test public void createNonNestedUrlFromString() throws Exception { - nonNestedJarFileFromString( - "jar:file:" + this.rootJarFile.getAbsolutePath() + "!/2.dat"); + nonNestedJarFileFromString("jar:" + this.rootJarFile.toURI() + "!/2.dat"); } @Test - public void createNonNestedUrlFromStringWithDoubleSlash() throws Exception { + public void createNonNestedUrlFromPathString() throws Exception { nonNestedJarFileFromString( - "jar:file://" + this.rootJarFile.getAbsolutePath() + "!/2.dat"); + "jar:" + this.rootJarFile.toPath().toUri() + "!/2.dat"); } private void nonNestedJarFileFromString(String spec) throws Exception {