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 2023/01/29 16:57:22 UTC
[commons-validator] 04/04: Remove useless parens
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
commit e57841b303bb0ebdd068c2ac6aec12e7d8e815c9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 29 11:54:32 2023 -0500
Remove useless parens
---
.../commons/validator/routines/checkdigit/IBANCheckDigit.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.java b/src/main/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.java
index 9338f783..fbfc6087 100644
--- a/src/main/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.java
+++ b/src/main/java/org/apache/commons/validator/routines/checkdigit/IBANCheckDigit.java
@@ -78,7 +78,7 @@ public final class IBANCheckDigit implements CheckDigit, Serializable {
}
try {
final int modulusResult = calculateModulus(code);
- return (modulusResult == 1);
+ return modulusResult == 1;
} catch (final CheckDigitException ex) {
return false;
}
@@ -103,9 +103,9 @@ public final class IBANCheckDigit implements CheckDigit, Serializable {
}
code = code.substring(0, 2) + "00" + code.substring(4); // CHECKSTYLE IGNORE MagicNumber
final int modulusResult = calculateModulus(code);
- final int charValue = (98 - modulusResult); // CHECKSTYLE IGNORE MagicNumber
+ final int charValue = 98 - modulusResult; // CHECKSTYLE IGNORE MagicNumber
final String checkDigit = Integer.toString(charValue);
- return (charValue > 9 ? checkDigit : "0" + checkDigit); // CHECKSTYLE IGNORE MagicNumber
+ return charValue > 9 ? checkDigit : "0" + checkDigit; // CHECKSTYLE IGNORE MagicNumber
}
/**
@@ -130,7 +130,7 @@ public final class IBANCheckDigit implements CheckDigit, Serializable {
total = total % MODULUS;
}
}
- return (int)(total % MODULUS);
+ return (int) (total % MODULUS);
}
}