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

commit 77b8f6e85a9359a83a6fdfacb42f8b6245ed9de1
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Jul 4 15:22:23 2023 -0400

    No need to initialize to default value
---
 .../floatingpoint/PhotometricInterpreterFloat.java           |  2 +-
 .../imaging/examples/tiff/ExampleReadFloatingPointData.java  |  2 +-
 .../floatingpoint/PhotometricInterpreterFloatTest.java       | 12 ++++++------
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloat.java
 
b/src/main/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloat.java
index 84810986..980eecbf 100644
--- 
a/src/main/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloat.java
+++ 
b/src/main/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloat.java
@@ -276,7 +276,7 @@ public class PhotometricInterpreterFloat extends 
PhotometricInterpreter {
      * @return a valid ARGB value, or zero if no palette specification covers
      * the input value.
      */
-    public int mapValueToARGB(final float f) {
+    public int mapValueToArgb(final float f) {
 
         // The single-value palette entries can accept a Float.NaN as
         // a target while the range-of-values entries cannot.  So
diff --git 
a/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
 
b/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
index ca9974a2..08a4cc11 100644
--- 
a/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
+++ 
b/src/test/java/org/apache/commons/imaging/examples/tiff/ExampleReadFloatingPointData.java
@@ -174,7 +174,7 @@ public class ExampleReadFloatingPointData {
                 for (int x = 0; x < w; x++) {
                     final float f = rasterData.getValue(x, y);
                     final int argb
-                        = photometricInterpreter.mapValueToARGB(f);
+                        = photometricInterpreter.mapValueToArgb(f);
                     builder.setRgb(x, y, argb);
                 }
             }
diff --git 
a/src/test/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloatTest.java
 
b/src/test/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloatTest.java
index 2a1f4579..f954c12a 100644
--- 
a/src/test/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloatTest.java
+++ 
b/src/test/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloatTest.java
@@ -214,20 +214,20 @@ public class PhotometricInterpreterFloatTest {
     @Test
     public void testMapValueToARGB() {
 
-        int argb = pInterp.mapValueToARGB(0.5f);
+        int argb = pInterp.mapValueToArgb(0.5f);
         int test = imageBuilder.getRgb(128, 128);
         assertEquals(test, argb, "Conflicting results from value-to-ARGB map");
 
         // pInterp does not define a state for NaN, but bandedInterp does.
         // so test both variations
-        argb = pInterp.mapValueToARGB(Float.NaN);
+        argb = pInterp.mapValueToArgb(Float.NaN);
         assertEquals(0, argb, "Non-defined NaN did not return ARGB of zero");
 
         // to test mappings for special values, use the banded-interpreter
-        argb = bandedInterp.mapValueToARGB(Float.NaN);
+        argb = bandedInterp.mapValueToArgb(Float.NaN);
         test = Color.gray.getRGB();
         assertEquals(test, argb, "Float.NaN mapped to incorrect ARGB");
-        argb = bandedInterp.mapValueToARGB(-1f);
+        argb = bandedInterp.mapValueToArgb(-1f);
         test = Color.gray.getRGB();
         assertEquals(test, argb, "Excluded value mapped to incorrect ARGB");
     }
@@ -255,8 +255,8 @@ public class PhotometricInterpreterFloatTest {
         int argb1 = imageBuilder.getRgb(1, 1) | 0xff000000;
         assertEquals(argb0, c0.getRGB(), "Invalid result for overlapping 
palette entry 0");
         assertEquals(argb1, c1.getRGB(), "Invalid result for overlapping 
palette entry 1");
-        argb0 = interpreter.mapValueToARGB(0.5f);
-        argb1 = interpreter.mapValueToARGB(1.2f);
+        argb0 = interpreter.mapValueToArgb(0.5f);
+        argb1 = interpreter.mapValueToArgb(1.2f);
         assertEquals(argb0, c0.getRGB(), "Invalid mapping for overlapping 
palette entry 0");
         assertEquals(argb1, c1.getRGB(), "Invalid mapping for overlapping 
palette entry 1");
     }

Reply via email to