From f36af7b16d0a73b775f14a2ad080fd8cec79f8c3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 17 Jun 2019 11:02:54 +0100 Subject: [PATCH] Polish --- .../org/springframework/boot/loader/jar/HandlerTests.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/HandlerTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/HandlerTests.java index 90253828994..902aca42123 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/HandlerTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/HandlerTests.java @@ -166,8 +166,8 @@ class HandlerTests { } @Test - public void whenJarHasAPlusInItsPathConnectionJarFileMatchesOriginalJarFile() throws Exception { - File testJar = this.temporaryFolder.newFile("t+e+s+t.jar"); + void whenJarHasAPlusInItsPathConnectionJarFileMatchesOriginalJarFile(@TempDir File tempDir) throws Exception { + File testJar = new File(tempDir, "t+e+s+t.jar"); TestJarCreator.createTestJar(testJar); URL url = new URL(null, "jar:" + testJar.toURI().toURL() + "!/nested.jar!/3.dat", this.handler); JarURLConnection connection = (JarURLConnection) url.openConnection(); @@ -180,8 +180,8 @@ class HandlerTests { } @Test - public void whenJarHasASpaceInItsPathConnectionJarFileMatchesOriginalJarFile() throws Exception { - File testJar = this.temporaryFolder.newFile("t e s t.jar"); + void whenJarHasASpaceInItsPathConnectionJarFileMatchesOriginalJarFile(@TempDir File tempDir) throws Exception { + File testJar = new File(tempDir, "t e s t.jar"); TestJarCreator.createTestJar(testJar); URL url = new URL(null, "jar:" + testJar.toURI().toURL() + "!/nested.jar!/3.dat", this.handler); JarURLConnection connection = (JarURLConnection) url.openConnection();