You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2020/11/21 22:24:51 UTC

[logging-log4j2] 04/12: Use Arrays.fill().

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 6204c496ce8a9d43a42ab90c46839d254e4d8099
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 21 16:39:13 2020 -0500

    Use Arrays.fill().
---
 .../java/org/apache/logging/log4j/core/async/perftest/Histogram.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/Histogram.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/Histogram.java
index 39cde5f..89cf29f 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/Histogram.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/Histogram.java
@@ -213,10 +213,7 @@ public final class Histogram
         maxValue = 0L;
         minValue = Long.MAX_VALUE;
 
-        for (int i = 0, size = counts.length; i < size; i++)
-        {
-            counts[i] = 0L;
-        }
+        Arrays.fill(counts, 0L);
     }
 
     /**