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/01/01 14:14:36 UTC

[commons-compress] 04/06: Use curly-only array declaration

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 1e1bdcb9f63d9f8381ddd012740c8543164415eb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 1 08:59:10 2023 -0500

    Use curly-only array declaration
---
 .../java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
index bf99d211..2cf054c1 100644
--- a/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/tar/TarUtilsTest.java
@@ -465,7 +465,7 @@ public class TarUtilsTest {
         assertThrows(IllegalArgumentException.class, () -> TarUtils.parseOctal(buffer1, 0, buffer1.length),
                 "Expected IllegalArgumentException - should be at least 2 bytes long");
 
-        final byte[] buffer2 = new byte[]{0}; // 1-byte array
+        final byte[] buffer2 = {0}; // 1-byte array
         assertThrows(IllegalArgumentException.class, () -> TarUtils.parseOctal(buffer2, 0, buffer2.length),
                 "Expected IllegalArgumentException - should be at least 2 bytes long");