Fix test that depended on snapshot version

A test case would fail to accurately capture the contents
of the layers.idx file unless the test project contained
at least one non-project snapshot dependency, which was only
true when the Spring Boot version was a snapshot.

See gh-23463
This commit is contained in:
Scott Frederick 2020-10-29 19:40:13 -05:00
parent d951f28e16
commit f080bb6c25
1 changed files with 1 additions and 0 deletions

View File

@ -402,6 +402,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
while (line != null) {
if (line.startsWith("- ")) {
layer = line.substring(3, line.length() - 2);
index.put(layer, new ArrayList<>());
}
else if (line.startsWith(" - ")) {
index.computeIfAbsent(layer, (key) -> new ArrayList<>()).add(line.substring(5, line.length() - 1));