This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
commit 44706ad90c8f066b743a140b638624300aae311c Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Aug 1 07:47:25 2024 -0400 Use StringUtils.repeat() --- src/test/java/org/apache/commons/compress/archivers/TarTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/archivers/TarTest.java b/src/test/java/org/apache/commons/compress/archivers/TarTest.java index 3bf2b1f31..e108e82e3 100644 --- a/src/test/java/org/apache/commons/compress/archivers/TarTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/TarTest.java @@ -48,14 +48,12 @@ import org.apache.commons.compress.utils.ByteUtils; import org.apache.commons.io.IOUtils; import org.junit.jupiter.api.Test; +import shaded.org.apache.commons.lang3.StringUtils; + public final class TarTest extends AbstractTest { private String createLongName(final int nameLength) { - final StringBuilder buffer = new StringBuilder(); - for (int i = 0; i < nameLength; i++) { - buffer.append('a'); - } - return buffer.toString(); + return StringUtils.repeat('a', nameLength); } private byte[] createTarWithOneLongNameEntry(final String longName) throws IOException {