From 68b83a8f0023c453e319bca1863d978349323f8b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 31 Mar 2016 10:33:03 +0100 Subject: [PATCH] Improve handling of loader.path in PropertiesLauncher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, if loader.path directly specified a jar file that contained nested archives (.zip or .jar), launching would fail unless those nested archives were uncompressed. However, if loader.path specified a directory that contained such a jar file the launch would succeed. This was because the nested archives within the jar were ignored. This commit updates PropertiesLauncher so that its behaviour in the scenarios described above is consistent by not looking for archives nested with a jar that’s be specified on loader.path. The javadoc for loader.path has also been updated to make it clear that loader.path can points to directories or jar files, bringing it into line with the reference guide. Closes gh-3701 --- .../boot/loader/PropertiesLauncher.java | 26 ++++++++++++------- .../boot/loader/PropertiesLauncherTests.java | 19 ++++++++++++++ 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java index 5607a4048d2..ab5a0322c79 100644 --- a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java +++ b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java @@ -55,9 +55,10 @@ import org.springframework.boot.loader.util.SystemPropertyUtils; * extracts optional values (which can also be provided overridden as System properties in * case the file doesn't exist): *