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

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git

commit a49085909f887c50e378dd79387381c7e1ddde6e
Author: Emmanuel Bourg <ebo...@apache.org>
AuthorDate: Mon Nov 18 10:54:25 2024 +0100

    Use Java-style array declarations
---
 .../org/apache/commons/validator/routines/CreditCardValidator.java  | 2 +-
 .../org/apache/commons/validator/routines/DomainValidatorTest.java  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java 
b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
index 2f1f5475..ffa15556 100644
--- 
a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
+++ 
b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
@@ -92,7 +92,7 @@ public class CreditCardValidator implements Serializable {
         final String high; // e.g. 34 or 65
         final int minLen; // e.g. 16 or -1
         final int maxLen; // e.g. 19 or -1
-        final int lengths[]; // e.g. 16,18,19
+        final int[] lengths; // e.g. 16,18,19
 
         /**
          * Create a credit card range specifier for use in validation
diff --git 
a/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java 
b/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
index 6a489344..c2f9747b 100644
--- 
a/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
+++ 
b/src/test/java/org/apache/commons/validator/routines/DomainValidatorTest.java
@@ -264,7 +264,7 @@ public class DomainValidatorTest {
     // Download and process local copy of 
https://data.iana.org/TLD/tlds-alpha-by-domain.txt
     // Check if the internal TLD table is up to date
     // Check if the internal TLD tables have any spurious entries
-    public static void main(final String a[]) throws Exception {
+    public static void main(final String[] a) throws Exception {
         // Check the arrays first as this affects later checks
         // Doing this here makes it easier when updating the lists
         boolean ok = true;
@@ -583,9 +583,9 @@ public class DomainValidatorTest {
 //      characters MUST be recognized as dots: U+002E (full stop), U+3002
 //      (ideographic full stop), U+FF0E (fullwidth full stop), U+FF61
 //      (halfwidth ideographic full stop).
-        final String otherDots[][] = { { "b\u3002", "b.", }, { "b\uFF0E", 
"b.", }, { "b\uFF61", "b.", }, { "\u3002", ".", }, { "\uFF0E", ".", },
+        final String[][] otherDots = { { "b\u3002", "b.", }, { "b\uFF0E", 
"b.", }, { "b\uFF61", "b.", }, { "\u3002", ".", }, { "\uFF0E", ".", },
                 { "\uFF61", ".", }, };
-        for (final String s[] : otherDots) {
+        for (final String[] s : otherDots) {
             assertEquals(s[1], DomainValidator.unicodeToASCII(s[0]));
         }
     }

Reply via email to