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/04/18 12:43:49 UTC

[commons-lang] branch master updated: Remove unnecessary conditions. It's no need it after assigns tmp to duration. (#965)

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-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new 65ac1e9f8 Remove unnecessary conditions. It's no need it after assigns tmp to duration. (#965)
65ac1e9f8 is described below

commit 65ac1e9f8852207382e5106117c0b7501b7a1468
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Tue Apr 18 14:43:43 2023 +0200

    Remove unnecessary conditions. It's no need it after assigns tmp to duration. (#965)
---
 src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
index d1b046568..da4b9769f 100644
--- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
@@ -190,9 +190,6 @@ public class DurationFormatUtils {
                     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);
-                    }
                 }
             }
             if (!duration.isEmpty()) {