You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/03/17 19:17:42 UTC
[commons-compress] 01/02: Sort member
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 ac8c5e1e1f8571e47e98bce97c890f45167a3aa2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Mar 17 14:43:11 2023 -0400
Sort member
---
.../archivers/tar/TarArchiveOutputStreamTest.java | 32 +++++++++++-----------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
index ffa98eac..1595b374 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStreamTest.java
@@ -754,22 +754,6 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
assertEquals("6 a=b\n", new String(data, 512, 6, UTF_8));
}
- private byte[] writePaxHeader(final Map<String, String> m) throws Exception {
- final ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try (TarArchiveOutputStream tos = new TarArchiveOutputStream(bos, "ASCII")) {
- tos.writePaxHeaders(new TarArchiveEntry("x"), "foo", m);
-
- // add a dummy entry so data gets written
- final TarArchiveEntry t = new TarArchiveEntry("foo");
- t.setSize(10 * 1024);
- tos.putArchiveEntry(t);
- tos.write(new byte[10 * 1024]);
- tos.closeArchiveEntry();
- }
-
- return bos.toByteArray();
- }
-
/**
* @see "https://issues.apache.org/jira/browse/COMPRESS-642"
*/
@@ -791,4 +775,20 @@ public class TarArchiveOutputStreamTest extends AbstractTestCase {
tos.close();
}
+ private byte[] writePaxHeader(final Map<String, String> m) throws Exception {
+ final ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ try (TarArchiveOutputStream tos = new TarArchiveOutputStream(bos, "ASCII")) {
+ tos.writePaxHeaders(new TarArchiveEntry("x"), "foo", m);
+
+ // add a dummy entry so data gets written
+ final TarArchiveEntry t = new TarArchiveEntry("foo");
+ t.setSize(10 * 1024);
+ tos.putArchiveEntry(t);
+ tos.write(new byte[10 * 1024]);
+ tos.closeArchiveEntry();
+ }
+
+ return bos.toByteArray();
+ }
+
}