Skip to content

Commit 7a34fae

Browse files
committed
Use +=
1 parent 0ad8c8b commit 7a34fae

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/org/apache/commons/codec/language/Caverphone1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public String encode(final String source) {
117117
txt = txt.replace("3", "");
118118

119119
// 6. put six 1s on the end
120-
txt = txt + SIX_1;
120+
txt += SIX_1;
121121

122122
// 7. take the first six characters as the code
123123
return txt.substring(0, SIX_1.length());

src/main/java/org/apache/commons/codec/language/Caverphone2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public String encode(final String source) {
121121
txt = txt.replace("3", "");
122122

123123
// 6. put ten 1s on the end
124-
txt = txt + TEN_1;
124+
txt += TEN_1;
125125

126126
// 7. take the first ten characters as the code
127127
return txt.substring(0, TEN_1.length());

src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ private int handleG(final String value, final DoubleMetaphoneResult result, int
568568
} else {
569569
result.append("KN");
570570
}
571-
index = index + 2;
571+
index += 2;
572572
} else if (contains(value, index + 1, 2, "LI") && !slavoGermanic) {
573573
result.append("KL", "L");
574574
index += 2;

0 commit comments

Comments
 (0)