diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java index 06d338afe7..7ff3153d0e 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java @@ -69,8 +69,6 @@ public abstract class AutoConfigurationPackages { * @throws IllegalStateException if auto-configuration is not enabled */ public static List get(BeanFactory beanFactory) { - // Currently we only store a single base package, but we return a list to - // allow this to change in the future if needed try { return beanFactory.getBean(BEAN, BasePackages.class).get(); } diff --git a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java index 028cacfd3c..9de969d5af 100644 --- a/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java +++ b/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java @@ -96,8 +96,8 @@ class JarURLConnection extends java.net.JarURLConnection { if (separatorIndex < 0) { return ""; } - return file - .substring(separatorIndex + SEPARATOR.length() + pathFromRoot.length()); + int specIndex = separatorIndex + SEPARATOR.length() + pathFromRoot.length(); + return file.substring(specIndex); } private JarFile getNestedJarFile(JarFile jarFile, String name) throws IOException {