From af2483816bf4978930b78677df250b22d9eadbe8 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Sun, 10 Apr 2016 12:12:19 -0700 Subject: [PATCH] Fix JarFileTests to work on Windows See gh-5287 --- .../org/springframework/boot/loader/jar/JarFileTests.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 f08243bb20..0dcee736ad 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 @@ -321,14 +321,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 {