This is an automated email from the ASF dual-hosted git repository.

garydgregory 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 9b2a3771a Better internal typing in DurationFormatUtils
9b2a3771a is described below

commit 9b2a3771a21c9879976830afef0fc78459df487f
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Nov 1 17:05:54 2026 -0500

    Better internal typing in DurationFormatUtils
---
 .../java/org/apache/commons/lang3/time/DurationFormatUtils.java     | 6 +++---
 1 file changed, 3 insertions(+), 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 24d45599e..089b60f8d 100644
--- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
@@ -106,7 +106,7 @@ static final class Token {
          * @param value to look find.
          * @return boolean {@code true} if contained.
          */
-        static boolean containsTokenWithValue(final Token[] tokens, final 
Object value) {
+        static boolean containsTokenWithValue(final Token[] tokens, final 
CharSequence value) {
             return Stream.of(tokens).anyMatch(token -> token.getValue() == 
value);
         }
 
@@ -165,7 +165,7 @@ int getCount() {
          *
          * @return Object value, non-null.
          */
-        Object getValue() {
+        CharSequence getValue() {
             return value;
         }
 
@@ -250,7 +250,7 @@ static String format(final Token[] tokens, final long 
years, final long months,
         int optionalIndex = -1;
         boolean inOptional = false;
         for (final Token token : tokens) {
-            final Object value = token.getValue();
+            final CharSequence value = token.getValue();
             final boolean isLiteral = value instanceof StringBuilder;
             final int count = token.getCount();
             if (optionalIndex != token.optionalIndex) {

Reply via email to