Skip to content

Commit d897435

Browse files
committed
Refactor NUL magic char
1 parent a6b4917 commit d897435

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
*/
6969
public class DaitchMokotoffSoundex implements StringEncoder {
7070

71+
/**
72+
* The NUL character.
73+
*/
74+
private static final char NUL = '\0';
75+
7176
/**
7277
* Inner class representing a branch during DM soundex encoding.
7378
*/
@@ -461,7 +466,7 @@ private String[] soundex(final String source, final boolean branching) {
461466
final Set<Branch> currentBranches = new LinkedHashSet<>();
462467
currentBranches.add(new Branch());
463468

464-
char lastChar = '\0';
469+
char lastChar = NUL;
465470
for (int index = 0; index < input.length(); index++) {
466471
final char ch = input.charAt(index);
467472

0 commit comments

Comments
 (0)