Upgrade to Commons Compress 1.25.0
Closes gh-39148
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2024 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.
|
||||
@@ -80,12 +80,12 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
||||
this.actual.writeTo(out);
|
||||
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
||||
new ByteArrayInputStream(out.toByteArray()))) {
|
||||
TarArchiveEntry entry = in.getNextTarEntry();
|
||||
TarArchiveEntry entry = in.getNextEntry();
|
||||
while (entry != null) {
|
||||
if (!entry.isDirectory()) {
|
||||
entryNames.add(entry.getName().replaceFirst("^/workspace/", ""));
|
||||
}
|
||||
entry = in.getNextTarEntry();
|
||||
entry = in.getNextEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
||||
this.actual.writeTo(out);
|
||||
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
||||
new ByteArrayInputStream(out.toByteArray()))) {
|
||||
TarArchiveEntry entry = in.getNextTarEntry();
|
||||
TarArchiveEntry entry = in.getNextEntry();
|
||||
while (entry != null) {
|
||||
if (entry.getName().equals(name)) {
|
||||
ByteArrayOutputStream entryOut = new ByteArrayOutputStream();
|
||||
@@ -109,7 +109,7 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
||||
assertConsumer.accept(new JsonContentAssert(LayerContentAssert.class, entryOut.toString()));
|
||||
return;
|
||||
}
|
||||
entry = in.getNextTarEntry();
|
||||
entry = in.getNextEntry();
|
||||
}
|
||||
}
|
||||
failWithMessage("Expected JSON entry '%s' in layer with digest '%s'", name, this.actual.getId());
|
||||
|
||||
Reference in New Issue
Block a user