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 2025/07/02 17:04:57 UTC

(commons-lang) 05/12: No need to nest else clause

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

commit a16503f3730e288e47005593ea57b58f5e79873b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jul 2 12:43:12 2025 -0400

    No need to nest else clause
---
 src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
index c17573839..f655a4afc 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
@@ -1514,9 +1514,8 @@ protected String parseToken(final String pattern, final int[] indexRef) {
                     if (!inLiteral && CharUtils.isAsciiAlpha(c2)) {
                         i--;
                         break;
-                    } else {
-                        buf.append(c);
                     }
+                    buf.append(c);
                 }
             }
         }