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


The following commit(s) were added to refs/heads/master by this push:
     new 570d5d64 Inline single use variable
570d5d64 is described below

commit 570d5d64b7ad7fe63cc54958f6ce304dd4eabc3b
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sun Oct 6 09:33:30 2024 -0400

    Inline single use variable
---
 .../org/apache/commons/validator/routines/AbstractFormatValidator.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
 
b/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
index c571fb09..4f3d288d 100644
--- 
a/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
+++ 
b/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
@@ -104,8 +104,7 @@ public abstract class AbstractFormatValidator implements 
Serializable {
      * @return The value formatted as a {@link String}.
      */
     public String format(final Object value, final String pattern, final 
Locale locale) {
-        final Format formatter = getFormat(pattern, locale);
-        return format(value, formatter);
+        return format(value, getFormat(pattern, locale));
     }
 
     /**

Reply via email to