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-bcel.git

commit 31227a3094beb28edafb4d86a639954ecae06aa7
Author: Gary David Gregory (Code signing key) <ggreg...@apache.org>
AuthorDate: Wed Apr 3 11:00:59 2024 -0400

    Reuse ArrayFill
---
 src/main/java/org/apache/bcel/classfile/Utility.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java 
b/src/main/java/org/apache/bcel/classfile/Utility.java
index a8609068..76fc8932 100644
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ b/src/main/java/org/apache/bcel/classfile/Utility.java
@@ -37,6 +37,7 @@ import java.util.zip.GZIPOutputStream;
 
 import org.apache.bcel.Const;
 import org.apache.bcel.util.ByteSequence;
+import org.apache.commons.lang3.ArrayFill;
 import org.apache.commons.lang3.ArrayUtils;
 
 /**
@@ -715,8 +716,7 @@ public abstract class Utility {
      */
     public static String fillup(final String str, final int length, final 
boolean leftJustify, final char fill) {
         final int len = length - str.length();
-        final char[] buf = new char[Math.max(len, 0)];
-        Arrays.fill(buf, fill);
+        final char[] buf = ArrayFill.fill(new char[Math.max(len, 0)], fill);
         if (leftJustify) {
             return str + new String(buf);
         }

Reply via email to