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 2020/11/20 22:17:08 UTC
[commons-imaging] branch master updated: Use Arrays.fill().
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-imaging.git
The following commit(s) were added to refs/heads/master by this push:
new eb68109 Use Arrays.fill().
eb68109 is described below
commit eb68109dd324732abaa31fed33440e477595231b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 17:17:04 2020 -0500
Use Arrays.fill().
---
.../commons/imaging/formats/tiff/TiffRasterStatisticsTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterStatisticsTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterStatisticsTest.java
index afbc164..0eff9d9 100644
--- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterStatisticsTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterStatisticsTest.java
@@ -21,6 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.util.Arrays;
+
import org.junit.jupiter.api.Test;
/**
@@ -98,9 +100,7 @@ public class TiffRasterStatisticsTest {
assertNotEquals(0, stat0.getMeanValue());
float[] zero = new float[100];
- for (int i = 0; i < zero.length; i++) {
- zero[i] = 10;
- }
+ Arrays.fill(zero, 10);
TiffRasterData zeroData = new TiffRasterData(10, 10, zero);
TiffRasterStatistics zeroStat = zeroData.getSimpleStatistics(10);
assertEquals(0.0f, zeroStat.getMeanValue(),