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 2023/06/17 18:25:55 UTC
[commons-codec] branch master updated: Simplify
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 27b5e02b Simplify
27b5e02b is described below
commit 27b5e02be9b3fc42ed3235fe64d2aba067b1e54d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jun 17 14:25:50 2023 -0400
Simplify
---
src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java b/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
index a57907e2..6b363fab 100644
--- a/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
+++ b/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
@@ -665,10 +665,7 @@ public class DoubleMetaphone implements StringEncoder {
* Handles 'T' cases.
*/
private int handleT(final String value, final DoubleMetaphoneResult result, int index) {
- if (contains(value, index, 4, "TION")) {
- result.append('X');
- index += 3;
- } else if (contains(value, index, 3, "TIA", "TCH")) {
+ if (contains(value, index, 4, "TION") || contains(value, index, 3, "TIA", "TCH")) {
result.append('X');
index += 3;
} else if (contains(value, index, 2, "TH") || contains(value, index, 3, "TTH")) {