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-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new ca9a5993 Reduce vertical whitespace
ca9a5993 is described below

commit ca9a599380a8469800b402ea4f17a5b6f94c99c8
Author: Gary Gregory <[email protected]>
AuthorDate: Mon Feb 16 18:19:19 2026 -0500

    Reduce vertical whitespace
---
 .../apache/commons/codec/language/ColognePhonetic.java  | 17 +++--------------
 .../commons/codec/language/DaitchMokotoffSoundex.java   |  3 +--
 .../codec/language/MatchRatingApproachEncoder.java      |  3 +--
 3 files changed, 5 insertions(+), 18 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java 
b/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
index 90b51e6a..debcb219 100644
--- a/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
+++ b/src/main/java/org/apache/commons/codec/language/ColognePhonetic.java
@@ -327,28 +327,21 @@ public class ColognePhonetic implements StringEncoder {
         if (text == null) {
             return null;
         }
-
         final CologneInputBuffer input = new 
CologneInputBuffer(preprocess(text));
         final CologneOutputBuffer output = new 
CologneOutputBuffer(input.length() * 2);
-
         char nextChar;
-
         char lastChar = CHAR_IGNORE;
         char chr;
-
         while (!input.isEmpty()) {
             chr = input.removeNext();
-
             if (!input.isEmpty()) {
                 nextChar = input.getNextChar();
             } else {
                 nextChar = CHAR_IGNORE;
             }
-
             if (chr < 'A' || chr > 'Z') {
-                    continue; // ignore unwanted characters
+                continue; // ignore unwanted characters
             }
-
             if (arrayContains(AEIJOUY, chr)) {
                 output.put('0');
             } else if (chr == 'B' || chr == 'P' && nextChar != 'H') {
@@ -397,7 +390,6 @@ public class ColognePhonetic implements StringEncoder {
                     break;
                 }
             }
-
             lastChar = chr;
         }
         return output.toString();
@@ -406,11 +398,8 @@ public class ColognePhonetic implements StringEncoder {
     @Override
     public Object encode(final Object object) throws EncoderException {
         if (!(object instanceof String)) {
-            throw new EncoderException("This method's parameter was expected 
to be of the type " +
-                String.class.getName() +
-                ". But actually it was of the type " +
-                object.getClass().getName() +
-                ".");
+            throw new EncoderException("This method's parameter was expected 
to be of the type " + String.class.getName() + ". But actually it was of the 
type "
+                    + object.getClass().getName() + ".");
         }
         return encode((String) object);
     }
diff --git 
a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java 
b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
index a94caf9d..881b78cd 100644
--- a/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
+++ b/src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java
@@ -380,8 +380,7 @@ public class DaitchMokotoffSoundex implements StringEncoder 
{
     @Override
     public Object encode(final Object obj) throws EncoderException {
         if (!(obj instanceof String)) {
-            throw new EncoderException(
-                    "Parameter supplied to DaitchMokotoffSoundex encode is not 
of type java.lang.String");
+            throw new EncoderException("Parameter supplied to 
DaitchMokotoffSoundex encode is not of type java.lang.String");
         }
         return encode((String) obj);
     }
diff --git 
a/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
 
b/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
index 28b77be5..1ae00c3a 100644
--- 
a/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
+++ 
b/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
@@ -109,8 +109,7 @@ public class MatchRatingApproachEncoder implements 
StringEncoder {
     @Override
     public final Object encode(final Object object) throws EncoderException {
         if (!(object instanceof String)) {
-            throw new EncoderException(
-                    "Parameter supplied to Match Rating Approach encoder is 
not of type java.lang.String");
+            throw new EncoderException("Parameter supplied to Match Rating 
Approach encoder is not of type java.lang.String");
         }
         return encode((String) object);
     }

Reply via email to