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


The following commit(s) were added to refs/heads/master by this push:
     new 251b38f1 Use try-with-resources
251b38f1 is described below

commit 251b38f1b79f94232b72949962ca55106a04a281
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Nov 4 07:14:28 2023 -0400

    Use try-with-resources
    
    More assertions
---
 src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java 
b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
index 6f7fa8d8..fd7bbbd3 100644
--- a/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/ByteUtilsTest.java
@@ -202,8 +202,10 @@ public class ByteUtilsTest {
         try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
             final DataOutput dos = new DataOutputStream(bos);
             toLittleEndian(dos, 2 + 3 * 256 + 4 * 256 * 256 + 128L * 256 * 256 
* 256, 4);
-            assertArrayEquals(new byte[] { 2, 3, 4, (byte) 128 }, 
bos.toByteArray());
+            byteArray = bos.toByteArray();
+            assertArrayEquals(expected, byteArray);
         }
+        assertArrayEquals(expected, byteArray);
     }
 
     @Test

Reply via email to