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 2021/07/23 14:12:59 UTC

[commons-text] branch master updated: No need to nest.

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


The following commit(s) were added to refs/heads/master by this push:
     new 562472d  No need to nest.
562472d is described below

commit 562472d5f51937bedce4a63686df5a97207977ac
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jul 23 10:12:56 2021 -0400

    No need to nest.
---
 src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java b/src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java
index 953eb76..a7d251b 100644
--- a/src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java
+++ b/src/main/java/org/apache/commons/text/numbers/ParsedDecimal.java
@@ -572,11 +572,10 @@ final class ParsedDecimal {
                 // value did not carry over; done adding
                 digits[i] = d;
                 break;
-            } else {
-                // value carried over; the current position is 0
-                // which we will ignore by shortening the digit count
-                ++removedDigits;
             }
+            // value carried over; the current position is 0
+            // which we will ignore by shortening the digit count
+            ++removedDigits;
         }
 
         if (i < 0) {