Skip to content

Commit f080bb6

Browse files
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
1 parent d951f28 commit f080bb6

File tree

1 file changed

+1
-0
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven

1 file changed

+1
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ private Map<String, List<String>> readLayerIndex(JarFile jarFile) throws IOExcep
402402
while (line != null) {
403403
if (line.startsWith("- ")) {
404404
layer = line.substring(3, line.length() - 2);
405+
index.put(layer, new ArrayList<>());
405406
}
406407
else if (line.startsWith(" - ")) {
407408
index.computeIfAbsent(layer, (key) -> new ArrayList<>()).add(line.substring(5, line.length() - 1));

0 commit comments

Comments
 (0)