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 2024/12/28 16:22:42 UTC

(commons-validator) 10/18: Add Checkstyle ModifierOrder

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 84b62d71da8e56a237dc4dccb79306b5f859c06b
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sat Dec 28 11:13:13 2024 -0500

    Add Checkstyle ModifierOrder
---
 src/conf/checkstyle/checkstyle.xml                                | 1 +
 src/main/java/org/apache/commons/validator/FormSet.java           | 8 ++++----
 .../apache/commons/validator/routines/InetAddressValidator.java   | 2 +-
 .../java/org/apache/commons/validator/AbstractCommonTest.java     | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/conf/checkstyle/checkstyle.xml b/src/conf/checkstyle/checkstyle.xml
index d44ea9a4..3c673d8b 100644
--- a/src/conf/checkstyle/checkstyle.xml
+++ b/src/conf/checkstyle/checkstyle.xml
@@ -57,6 +57,7 @@
     <module name="MemberName" />
     <module name="MethodName" />
     <module name="MissingOverride" />
+    <module name="ModifierOrder" />
     <module name="ParameterNumber">
       <property name="max" value="4" />
     </module>
diff --git a/src/main/java/org/apache/commons/validator/FormSet.java b/src/main/java/org/apache/commons/validator/FormSet.java
index 51e1a252..d76608a0 100644
--- a/src/main/java/org/apache/commons/validator/FormSet.java
+++ b/src/main/java/org/apache/commons/validator/FormSet.java
@@ -39,24 +39,24 @@ public class FormSet implements Serializable {
     /**
      * This is the type of {@code FormSet}s where no locale is specified.
      */
-    protected final static int GLOBAL_FORMSET = 1;
+    protected static final int GLOBAL_FORMSET = 1;
 
     /**
      * This is the type of {@code FormSet}s where only language locale is
      * specified.
      */
-    protected final static int LANGUAGE_FORMSET = 2;
+    protected static final int LANGUAGE_FORMSET = 2;
 
     /**
      * This is the type of {@code FormSet}s where only language and country
      * locale are specified.
      */
-    protected final static int COUNTRY_FORMSET = 3;
+    protected static final int COUNTRY_FORMSET = 3;
 
     /**
      * This is the type of {@code FormSet}s where full locale has been set.
      */
-    protected final static int VARIANT_FORMSET = 4;
+    protected static final int VARIANT_FORMSET = 4;
 
     /** Logging */
     private transient Log log = LogFactory.getLog(FormSet.class);
diff --git a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
index b0b5e031..914b7d63 100644
--- a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
@@ -66,7 +66,7 @@ public class InetAddressValidator implements Serializable {
     private static final Pattern ID_CHECK_PATTERN = Pattern.compile("[^\\s/%]+");
 
     /** IPv4 RegexValidator */
-    private final static RegexValidator IPV4_VALIDATOR = new RegexValidator(IPV4_REGEX);
+    private static final RegexValidator IPV4_VALIDATOR = new RegexValidator(IPV4_REGEX);
 
     /**
      * Returns the singleton instance of this validator.
diff --git a/src/test/java/org/apache/commons/validator/AbstractCommonTest.java b/src/test/java/org/apache/commons/validator/AbstractCommonTest.java
index 14e0cc4c..1d593534 100644
--- a/src/test/java/org/apache/commons/validator/AbstractCommonTest.java
+++ b/src/test/java/org/apache/commons/validator/AbstractCommonTest.java
@@ -24,7 +24,7 @@ import org.xml.sax.SAXException;
 /**
  * Consolidates reading in XML config file into parent class.
  */
-abstract public class AbstractCommonTest {
+public abstract class AbstractCommonTest {
 
     /**
      * Resources used for validation tests.