From 08f0b4c462312127e774cc507a01f420f367f5e2 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Thu, 26 Dec 2024 21:37:09 +0100 Subject: [PATCH] IBANValidator: remove unneeded expression --- .../org/apache/commons/validator/routines/IBANValidator.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/org/apache/commons/validator/routines/IBANValidator.java b/src/main/java/org/apache/commons/validator/routines/IBANValidator.java index c93b7b91e..3d6d4b8b6 100644 --- a/src/main/java/org/apache/commons/validator/routines/IBANValidator.java +++ b/src/main/java/org/apache/commons/validator/routines/IBANValidator.java @@ -101,10 +101,6 @@ public Validator(final String countryCode, final int ibanLength, final String re if (ibanLength > MAX_LEN || ibanLength < MIN_LEN) { throw new IllegalArgumentException("Invalid length parameter, must be in range " + MIN_LEN + " to " + MAX_LEN + " inclusive: " + ibanLength); } - final String regex = countryCode + regexWithoutCC; - if (!regex.startsWith(countryCode)) { - throw new IllegalArgumentException("countryCode '" + countryCode + "' does not agree with format: " + regex); - } this.countryCode = countryCode; this.otherCountryCodes = otherCountryCodes.clone(); final List regexList = new ArrayList<>(this.otherCountryCodes.length + 1);