Skip to content

Commit 8ff9b61

Browse files
committed
Use short-hand ArrayFill
1 parent cda940c commit 8ff9b61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/tar/LargeTarTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.commons.compress.compressors.CompressorStreamFactory;
3535
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
3636
import org.apache.commons.compress.utils.IOUtils;
37+
import org.apache.commons.lang3.ArrayFill;
3738
import org.apache.commons.vfs2.CacheStrategy;
3839
import org.apache.commons.vfs2.FileObject;
3940
import org.apache.commons.vfs2.cache.SoftRefFilesCache;
@@ -72,8 +73,7 @@ protected void createLargeFile(final String path, final String name) throws Exce
7273
final PipedInputStream inTarFileStream = new PipedInputStream(outTarFileStream);
7374

7475
final Thread source = new Thread(() -> {
75-
final byte[] ba_1k = new byte[(int) _1K];
76-
Arrays.fill(ba_1k, (byte) 'a');
76+
final byte[] ba_1k = ArrayFill.fill(new byte[(int) _1K], (byte) 'a');
7777
try {
7878
final TarArchiveOutputStream outTarStream = (TarArchiveOutputStream) new ArchiveStreamFactory()
7979
.createArchiveOutputStream(ArchiveStreamFactory.TAR, outTarFileStream);

0 commit comments

Comments
 (0)