Skip to content

Commit 10e750a

Browse files
committed
Merge branch '3.2.x'
Closes gh-39341
2 parents 224ce7c + 8c18d75 commit 10e750a

File tree

15 files changed

+48
-48
lines changed

15 files changed

+48
-48
lines changed

spring-boot-project/spring-boot-parent/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ bom {
3434
]
3535
}
3636
}
37-
library("Commons Compress", "1.23.0") {
37+
library("Commons Compress", "1.25.0") {
3838
group("org.apache.commons") {
3939
modules = [
4040
"commons-compress"

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
api("com.fasterxml.jackson.core:jackson-databind")
2828
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
2929
api("net.java.dev.jna:jna-platform")
30-
api("org.apache.commons:commons-compress:1.19")
30+
api("org.apache.commons:commons-compress")
3131
api("org.apache.httpcomponents.client5:httpclient5")
3232
api("org.springframework:spring-core")
3333
api("org.tomlj:tomlj:1.0.0")

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ImageBuildpack.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -131,12 +131,12 @@ private void copyLayerTar(Path path, OutputStream out) throws IOException {
131131
try (TarArchiveInputStream tarIn = new TarArchiveInputStream(Files.newInputStream(path));
132132
TarArchiveOutputStream tarOut = new TarArchiveOutputStream(out)) {
133133
tarOut.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX);
134-
TarArchiveEntry entry = tarIn.getNextTarEntry();
134+
TarArchiveEntry entry = tarIn.getNextEntry();
135135
while (entry != null) {
136136
tarOut.putArchiveEntry(entry);
137137
StreamUtils.copy(tarIn, tarOut);
138138
tarOut.closeArchiveEntry();
139-
entry = tarIn.getNextTarEntry();
139+
entry = tarIn.getNextEntry();
140140
}
141141
tarOut.finish();
142142
}

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/TarGzipBuildpack.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -90,13 +90,13 @@ private void copyAndRebaseEntries(OutputStream outputStream) throws IOException
9090
new GzipCompressorInputStream(Files.newInputStream(this.path)));
9191
TarArchiveOutputStream output = new TarArchiveOutputStream(outputStream)) {
9292
writeBasePathEntries(output, basePath);
93-
TarArchiveEntry entry = tar.getNextTarEntry();
93+
TarArchiveEntry entry = tar.getNextEntry();
9494
while (entry != null) {
9595
entry.setName(basePath + "/" + entry.getName());
9696
output.putArchiveEntry(entry);
9797
StreamUtils.copy(tar, output);
9898
output.closeArchiveEntry();
99-
entry = tar.getNextTarEntry();
99+
entry = tar.getNextEntry();
100100
}
101101
output.finish();
102102
}

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,15 @@ public void exportLayerFiles(ImageReference reference, IOBiConsumer<String, Path
296296
ImageArchiveManifest manifest = null;
297297
Map<String, Path> layerFiles = new HashMap<>();
298298
try (TarArchiveInputStream tar = new TarArchiveInputStream(response.getContent())) {
299-
TarArchiveEntry entry = tar.getNextTarEntry();
299+
TarArchiveEntry entry = tar.getNextEntry();
300300
while (entry != null) {
301301
if (entry.getName().equals("manifest.json")) {
302302
manifest = readManifest(tar);
303303
}
304304
if (entry.getName().endsWith(".tar")) {
305305
layerFiles.put(entry.getName(), copyToTemp(tar));
306306
}
307-
entry = tar.getNextTarEntry();
307+
entry = tar.getNextEntry();
308308
}
309309
}
310310
Assert.notNull(manifest, "Manifest not found in image " + reference);

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/DirectoryBuildpackTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -128,10 +128,10 @@ private void assertHasExpectedLayers(Buildpack buildpack) throws IOException {
128128
byte[] content = layers.get(0).toByteArray();
129129
try (TarArchiveInputStream tar = new TarArchiveInputStream(new ByteArrayInputStream(content))) {
130130
List<TarArchiveEntry> entries = new ArrayList<>();
131-
TarArchiveEntry entry = tar.getNextTarEntry();
131+
TarArchiveEntry entry = tar.getNextEntry();
132132
while (entry != null) {
133133
entries.add(entry);
134-
entry = tar.getNextTarEntry();
134+
entry = tar.getNextEntry();
135135
}
136136
assertThat(entries).extracting("name", "mode")
137137
.containsExactlyInAnyOrder(tuple("/cnb/", 0755), tuple("/cnb/buildpacks/", 0755),

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/build/ImageBuildpackTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -213,10 +213,10 @@ private void assertAppliesExpectedLayers(Buildpack buildpack) throws IOException
213213
byte[] content = layers.get(0).toByteArray();
214214
List<TarArchiveEntry> entries = new ArrayList<>();
215215
try (TarArchiveInputStream tar = new TarArchiveInputStream(new ByteArrayInputStream(content))) {
216-
TarArchiveEntry entry = tar.getNextTarEntry();
216+
TarArchiveEntry entry = tar.getNextEntry();
217217
while (entry != null) {
218218
entries.add(entry);
219-
entry = tar.getNextTarEntry();
219+
entry = tar.getNextEntry();
220220
}
221221
}
222222
assertThat(entries).extracting("name", "mode")

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/DockerApiTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -336,10 +336,10 @@ void exportLayersExportsLayerTars() throws Exception {
336336
archive.writeTo(out);
337337
try (TarArchiveInputStream in = new TarArchiveInputStream(
338338
new ByteArrayInputStream(out.toByteArray()))) {
339-
TarArchiveEntry entry = in.getNextTarEntry();
339+
TarArchiveEntry entry = in.getNextEntry();
340340
while (entry != null) {
341341
contents.add(name, entry.getName());
342-
entry = in.getNextTarEntry();
342+
entry = in.getNextEntry();
343343
}
344344
}
345345
});
@@ -364,10 +364,10 @@ void exportLayersWithSymlinksExportsLayerTars() throws Exception {
364364
archive.writeTo(out);
365365
try (TarArchiveInputStream in = new TarArchiveInputStream(
366366
new ByteArrayInputStream(out.toByteArray()))) {
367-
TarArchiveEntry entry = in.getNextTarEntry();
367+
TarArchiveEntry entry = in.getNextEntry();
368368
while (entry != null) {
369369
contents.add(name, entry.getName());
370-
entry = in.getNextTarEntry();
370+
entry = in.getNextEntry();
371371
}
372372
}
373373
});

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/ImageArchiveTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,14 +54,14 @@ void fromImageWritesToValidArchiveTar() throws Exception {
5454
try (TarArchiveInputStream tar = new TarArchiveInputStream(
5555
new ByteArrayInputStream(outputStream.toByteArray()))) {
5656
for (int i = 0; i < EXISTING_IMAGE_LAYER_COUNT; i++) {
57-
TarArchiveEntry blankEntry = tar.getNextTarEntry();
57+
TarArchiveEntry blankEntry = tar.getNextEntry();
5858
assertThat(blankEntry.getName()).isEqualTo("blank_" + i);
5959
}
60-
TarArchiveEntry layerEntry = tar.getNextTarEntry();
60+
TarArchiveEntry layerEntry = tar.getNextEntry();
6161
byte[] layerContent = read(tar, layerEntry.getSize());
62-
TarArchiveEntry configEntry = tar.getNextTarEntry();
62+
TarArchiveEntry configEntry = tar.getNextEntry();
6363
byte[] configContent = read(tar, configEntry.getSize());
64-
TarArchiveEntry manifestEntry = tar.getNextTarEntry();
64+
TarArchiveEntry manifestEntry = tar.getNextEntry();
6565
byte[] manifestContent = read(tar, manifestEntry.getSize());
6666
assertExpectedLayer(layerEntry, layerContent);
6767
assertExpectedConfig(configEntry, configContent);
@@ -72,7 +72,7 @@ void fromImageWritesToValidArchiveTar() throws Exception {
7272
private void assertExpectedLayer(TarArchiveEntry entry, byte[] content) throws Exception {
7373
assertThat(entry.getName()).isEqualTo("bb09e17fd1bd2ee47155f1349645fcd9fff31e1247c7ed99cad469f1c16a4216.tar");
7474
try (TarArchiveInputStream tar = new TarArchiveInputStream(new ByteArrayInputStream(content))) {
75-
TarArchiveEntry contentEntry = tar.getNextTarEntry();
75+
TarArchiveEntry contentEntry = tar.getNextEntry();
7676
assertThat(contentEntry.getName()).isEqualTo("/spring/");
7777
}
7878
}

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/type/LayerTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,9 +61,9 @@ void ofCreatesLayer() throws Exception {
6161
layer.writeTo(outputStream);
6262
try (TarArchiveInputStream tarStream = new TarArchiveInputStream(
6363
new ByteArrayInputStream(outputStream.toByteArray()))) {
64-
assertThat(tarStream.getNextTarEntry().getName()).isEqualTo("/directory/");
65-
assertThat(tarStream.getNextTarEntry().getName()).isEqualTo("/directory/file");
66-
assertThat(tarStream.getNextTarEntry()).isNull();
64+
assertThat(tarStream.getNextEntry().getName()).isEqualTo("/directory/");
65+
assertThat(tarStream.getNextEntry().getName()).isEqualTo("/directory/file");
66+
assertThat(tarStream.getNextEntry()).isNull();
6767
}
6868
}
6969

0 commit comments

Comments
 (0)