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/10/09 14:10:29 UTC

[GitHub] [commons-lang] arturobernalg commented on a diff in pull request #965: Remove unnecessary conditions. It's no need it after assigns tmp to duration

arturobernalg commented on code in PR #965:
URL: https://github.com/apache/commons-lang/pull/965#discussion_r990793928


##########
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java:
##########
@@ -190,9 +190,6 @@ public static String formatDurationWords(
                     duration = tmp;
                     tmp = StringUtils.replaceOnce(duration, " 0 minutes", StringUtils.EMPTY);
                     duration = tmp;
-                    if (tmp.length() != duration.length()) {
-                        duration = StringUtils.replaceOnce(tmp, " 0 seconds", StringUtils.EMPTY);
-                    }

Review Comment:
   Hi @kinow 
   Yes, could be a bug as well.  In any case we don't need that conditions.
   TY



-- 
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