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 1a275ea9d57ca8a8433bddd89567dec31dac4222
Author: Gary D. Gregory <[email protected]>
AuthorDate: Sat Feb 22 10:52:51 2025 -0500

    Use ternary expression
---
 .../apache/commons/imaging/formats/tiff/itu_t4/T4_T6_Tables.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/T4_T6_Tables.java
 
b/src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/T4_T6_Tables.java
index d5003295..c010e144 100644
--- 
a/src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/T4_T6_Tables.java
+++ 
b/src/main/java/org/apache/commons/imaging/formats/tiff/itu_t4/T4_T6_Tables.java
@@ -28,11 +28,7 @@ final class T4_T6_Tables {
 
         public void writeBits(final BitArrayOutputStream outputStream) {
             for (int i = 0; i < bitString.length(); i++) {
-                if (bitString.charAt(i) == '0') {
-                    outputStream.writeBit(0);
-                } else {
-                    outputStream.writeBit(1);
-                }
+                outputStream.writeBit(bitString.charAt(i) == '0' ? 0 : 1);
             }
         }
     }

Reply via email to