From c22a0e90a23caf34d8e4b3a45503d4f005f86170 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 24 Jun 2016 11:52:43 -0700 Subject: [PATCH] Polish --- .../boot/autoconfigure/AutoConfigurationPackages.java | 2 -- .../org/springframework/boot/loader/jar/JarURLConnection.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 {