MINOR: Make Histogram#clear more readable
Reviewers: Chia-Ping Tsai
*/
package org.apache.kafka.common.metrics.stats;
+import java.util.Arrays;
+
public class Histogram {
private final BinScheme binScheme;
@@ -55,8 +57,7 @@ public class Histogram {
}
public void clear() {
- for (int i = 0; i < this.hist.length; i++)
- this.hist[i] = 0.0f;
+ Arrays.fill(this.hist, 0.0f);
this.count = 0;
}
