You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/06/29 20:48:35 UTC

[GitHub] [commons-codec] kinow commented on a diff in pull request #136: Remove redundant operations.

kinow commented on code in PR #136:
URL: https://github.com/apache/commons-codec/pull/136#discussion_r910399681


##########
src/main/java/org/apache/commons/codec/language/DaitchMokotoffSoundex.java:
##########
@@ -494,9 +494,6 @@ private String[] soundex(final String source, final boolean branching) {
 
             for (final Rule rule : rules) {
                 if (rule.matches(inputContext)) {
-                    if (branching) {
-                        nextBranches.clear();
-                    }

Review Comment:
   Isn't that to force a `clear()` when `nextBranches` is not an empty collection?
   
   ```
   nextBranches = branching ? new ArrayList<>() : Collections.emptyList();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org