Skip to content

Commit 17902c9

Browse files
tobias-lippertphilwebb
authored andcommitted
Remove unnecessary toString calls
See gh-39259
1 parent a31319c commit 17902c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/StaticResourceJarsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void ignoreWildcardUrls() throws Exception {
9595
void doesNotCloseJarFromCachedConnection() throws Exception {
9696
File jarFile = createResourcesJar("test-resources.jar");
9797
TrackedURLStreamHandler handler = new TrackedURLStreamHandler(true);
98-
URL url = new URL("jar", null, 0, jarFile.toURI().toURL().toString() + "!/", handler);
98+
URL url = new URL("jar", null, 0, jarFile.toURI().toURL() + "!/", handler);
9999
try {
100100
new StaticResourceJars().getUrlsFrom(url);
101101
assertThatNoException()
@@ -110,7 +110,7 @@ void doesNotCloseJarFromCachedConnection() throws Exception {
110110
void closesJarFromNonCachedConnection() throws Exception {
111111
File jarFile = createResourcesJar("test-resources.jar");
112112
TrackedURLStreamHandler handler = new TrackedURLStreamHandler(false);
113-
URL url = new URL("jar", null, 0, jarFile.toURI().toURL().toString() + "!/", handler);
113+
URL url = new URL("jar", null, 0, jarFile.toURI().toURL() + "!/", handler);
114114
new StaticResourceJars().getUrlsFrom(url);
115115
assertThatIllegalStateException()
116116
.isThrownBy(() -> ((JarURLConnection) handler.getConnection()).getJarFile().getComment())

0 commit comments

Comments
 (0)