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 2026/06/15 11:16:36 UTC
(commons-validator) 03/03: Inline single use local variable
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-validator.git
commit a426e30e7a15bbb22fa46be25be2f7f2f074e4c7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 15 11:14:06 2026 +0000
Inline single use local variable
---
.../java/org/apache/commons/validator/routines/ISBNValidator.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java b/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
index 8434296c..28c7906c 100644
--- a/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
@@ -262,8 +262,7 @@ public class ISBNValidator implements Serializable {
* otherwise {@code null}.
*/
public String validateISBN10(final String code) {
- final Object result = isbn10Validator.validate(code);
- return Objects.toString(result, null);
+ return Objects.toString(isbn10Validator.validate(code), null);
}
/**
@@ -278,8 +277,7 @@ public class ISBNValidator implements Serializable {
* otherwise {@code null}.
*/
public String validateISBN13(final String code) {
- final Object result = isbn13Validator.validate(code);
- return Objects.toString(result, null);
+ return Objects.toString(isbn13Validator.validate(code), null);
}
}