Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.
Fixes gh-24192
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
* Copyright 2012-2021 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.
|
||||
@@ -78,11 +78,11 @@ class ClassPathIndexFileTests {
|
||||
ClassPathIndexFile indexFile = copyAndLoadTestIndexFile();
|
||||
List<URL> urls = indexFile.getUrls();
|
||||
List<File> expected = new ArrayList<>();
|
||||
expected.add(new File(this.temp, "a.jar"));
|
||||
expected.add(new File(this.temp, "b.jar"));
|
||||
expected.add(new File(this.temp, "c.jar"));
|
||||
expected.add(new File(this.temp, "d.jar"));
|
||||
expected.add(new File(this.temp, "e.jar"));
|
||||
expected.add(new File(this.temp, "BOOT-INF/layers/one/lib/a.jar"));
|
||||
expected.add(new File(this.temp, "BOOT-INF/layers/one/lib/b.jar"));
|
||||
expected.add(new File(this.temp, "BOOT-INF/layers/one/lib/c.jar"));
|
||||
expected.add(new File(this.temp, "BOOT-INF/layers/two/lib/d.jar"));
|
||||
expected.add(new File(this.temp, "BOOT-INF/layers/two/lib/e.jar"));
|
||||
assertThat(urls).containsExactly(expected.stream().map(this::toUrl).toArray(URL[]::new));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- "a.jar"
|
||||
- "b.jar"
|
||||
- "c.jar"
|
||||
- "d.jar"
|
||||
- "e.jar"
|
||||
- "BOOT-INF/layers/one/lib/a.jar"
|
||||
- "BOOT-INF/layers/one/lib/b.jar"
|
||||
- "BOOT-INF/layers/one/lib/c.jar"
|
||||
- "BOOT-INF/layers/two/lib/d.jar"
|
||||
- "BOOT-INF/layers/two/lib/e.jar"
|
||||
|
||||
Reference in New Issue
Block a user