From bcbf7b5511c68e50e922c83b5d7b735b9a789692 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 2 Oct 2017 12:53:25 +0100 Subject: [PATCH] Update ChangeableUrlsTests to cope with URL-like Windows file paths Closes gh-10268 --- .../boot/devtools/restart/ChangeableUrlsTests.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ChangeableUrlsTests.java b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ChangeableUrlsTests.java index 19eca4ebc13..33b0cc1d5ba 100644 --- a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ChangeableUrlsTests.java +++ b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/restart/ChangeableUrlsTests.java @@ -75,12 +75,10 @@ public class ChangeableUrlsTests { @Test public void urlsFromJarClassPathAreConsidered() throws Exception { File relative = this.temporaryFolder.newFolder(); - File absoluteFile = this.temporaryFolder.newFolder(); URL absoluteUrl = this.temporaryFolder.newFolder().toURI().toURL(); File jarWithClassPath = makeJarFileWithUrlsInManifestClassPath( "project-core/target/classes/", "project-web/target/classes/", - "does-not-exist/target/classes", relative.getName() + "/", - absoluteFile.getAbsolutePath() + "/", absoluteUrl); + "does-not-exist/target/classes", relative.getName() + "/", absoluteUrl); new File(jarWithClassPath.getParentFile(), "project-core/target/classes") .mkdirs(); new File(jarWithClassPath.getParentFile(), "project-web/target/classes").mkdirs(); @@ -90,7 +88,7 @@ public class ChangeableUrlsTests { assertThat(urls.toList()).containsExactly( new URL(jarWithClassPath.toURI().toURL(), "project-core/target/classes/"), new URL(jarWithClassPath.toURI().toURL(), "project-web/target/classes/"), - relative.toURI().toURL(), absoluteFile.toURI().toURL(), absoluteUrl); + relative.toURI().toURL(), absoluteUrl); } private URL makeUrl(String name) throws IOException {