Merge branch '1.5.x'

This commit is contained in:
Andy Wilkinson
2018-03-05 11:55:18 +00:00
2 changed files with 25 additions and 9 deletions

View File

@@ -346,6 +346,17 @@ public class PropertiesLauncherTests {
assertThat(launcher.getMainClass()).isEqualTo("demo.FooApplication");
}
@Test
public void encodedFileUrlLoaderPathIsHandledCorrectly() throws Exception {
File loaderPath = this.temporaryFolder.newFolder("loader path");
System.setProperty("loader.path", loaderPath.toURI().toURL().toString());
PropertiesLauncher launcher = new PropertiesLauncher();
List<Archive> archives = launcher.getClassPathArchives();
assertThat(archives.size()).isEqualTo(1);
File archiveRoot = (File) ReflectionTestUtils.getField(archives.get(0), "root");
assertThat(archiveRoot).isEqualTo(loaderPath);
}
private void waitFor(String value) throws Exception {
int count = 0;
boolean timeout = false;