diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java index 9454b1094e..8b5b6d43be 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/ExplodedArchive.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java index 461969e579..fd90f9157d 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/archive/JarFileArchive.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ public class JarFileArchive implements Archive { private File tempUnpackFolder; public JarFileArchive(File file) throws IOException { - this(file, null); + this(file, file.toURI().toURL()); } public JarFileArchive(File file, URL url) throws IOException { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java index 440d6e6343..1d5ff669d5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/JarLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,9 +44,7 @@ public class JarLauncherTests extends AbstractExecutableArchiveLauncherTests { assertThat(archives).hasSize(2); assertThat(getUrls(archives)).containsOnly( new File(explodedRoot, "BOOT-INF/classes").toURI().toURL(), - new URL("jar:" - + new File(explodedRoot, "BOOT-INF/lib/foo.jar").toURI().toURL() - + "!/")); + new File(explodedRoot, "BOOT-INF/lib/foo.jar").toURI().toURL()); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java index e29b0ae3db..5f33aceed2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -142,7 +142,7 @@ public class PropertiesLauncherTests { assertThat(ReflectionTestUtils.getField(launcher, "paths").toString()) .isEqualTo("[jars/]"); List archives = launcher.getClassPathArchives(); - assertThat(archives).areExactly(1, endingWith("app.jar!/")); + assertThat(archives).areExactly(1, endingWith("app.jar")); } @Test @@ -176,7 +176,7 @@ public class PropertiesLauncherTests { .isEqualTo("[jar:file:./src/test/resources/nested-jars/app.jar!/]"); List archives = launcher.getClassPathArchives(); assertThat(archives).areExactly(1, endingWith("foo.jar!/")); - assertThat(archives).areExactly(1, endingWith("app.jar!/")); + assertThat(archives).areExactly(1, endingWith("app.jar")); } @Test @@ -185,7 +185,7 @@ public class PropertiesLauncherTests { PropertiesLauncher launcher = new PropertiesLauncher(); List archives = launcher.getClassPathArchives(); assertThat(archives).areExactly(1, endingWith("foo.jar!/")); - assertThat(archives).areExactly(1, endingWith("app.jar!/")); + assertThat(archives).areExactly(1, endingWith("app.jar")); } @Test @@ -204,7 +204,7 @@ public class PropertiesLauncherTests { PropertiesLauncher launcher = new PropertiesLauncher(); List archives = launcher.getClassPathArchives(); assertThat(archives).areExactly(1, endingWith("foo.jar!/")); - assertThat(archives).areExactly(1, endingWith("app.jar!/")); + assertThat(archives).areExactly(1, endingWith("app.jar")); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java index 94231ab02e..00f932b6a8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/WarLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,9 +44,7 @@ public class WarLauncherTests extends AbstractExecutableArchiveLauncherTests { assertThat(archives).hasSize(2); assertThat(getUrls(archives)).containsOnly( new File(explodedRoot, "WEB-INF/classes").toURI().toURL(), - new URL("jar:" - + new File(explodedRoot, "WEB-INF/lib/foo.jar").toURI().toURL() - + "!/")); + new File(explodedRoot, "WEB-INF/lib/foo.jar").toURI().toURL()); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java index 0e2b73ac1a..648477740a 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/ExplodedArchiveTests.java @@ -127,7 +127,7 @@ public class ExplodedArchiveTests { Entry entry = getEntriesMap(this.archive).get("nested.jar"); Archive nested = this.archive.getNestedArchive(entry); assertThat(nested.getUrl().toString()) - .isEqualTo("jar:" + this.rootFolder.toURI() + "nested.jar!/"); + .isEqualTo(this.rootFolder.toURI() + "nested.jar"); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java index 669b36edba..464cf55ca8 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/archive/JarFileArchiveTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,7 +84,7 @@ public class JarFileArchiveTests { @Test public void getUrl() throws Exception { URL url = this.archive.getUrl(); - assertThat(url.toString()).isEqualTo("jar:" + this.rootJarFileUrl + "!/"); + assertThat(url.toString()).isEqualTo(this.rootJarFileUrl); } @Test