diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java index 96c33a01a3..699092f22a 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration.java @@ -133,9 +133,7 @@ public class FlywayAutoConfiguration { else { flyway.setDataSource(this.dataSource); } - // TODO: remove this line once SPR-13749 is fixed flyway.setLocations(this.properties.getLocations().toArray(new String[0])); - return flyway; } diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java index b80d4327b7..537ce836a8 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2016 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-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 6736ac2ff2..77ee06a500 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 @@ -545,19 +545,13 @@ public class PropertiesLauncher extends Launcher { if (url.toString().endsWith(".jar") || url.toString().endsWith(".zip")) { return new JarFileArchive(new File(url.toURI())); } - else if (url.toString().endsWith("/*")) { + if (url.toString().endsWith("/*")) { String name = url.getFile(); File dir = new File(name.substring(0, name.length() - 1)); - if (dir.exists()) { - return new ExplodedArchive(new File(name.substring(0, name.length() - 1)), - false); - } - } - else { - String filename = URLDecoder.decode(url.getFile(), "UTF-8"); - return new ExplodedArchive(new File(filename)); + return (dir.exists() ? new ExplodedArchive(dir, false) : null); } - return null; + String filename = URLDecoder.decode(url.getFile(), "UTF-8"); + return new ExplodedArchive(new File(filename)); } private void addNestedArchivesFromParent(List urls) {