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


The following commit(s) were added to refs/heads/master by this push:
     new 85ce1d6  GitHub build should reuse the POM default goal which now uses 
"package" instead of "verify". We need package to call japicmp:cmp. Display 
Maven version for GitHub builds. Drop Checktyle allowUndeclaredRTE. Checkstyle: 
Refacor magic number into a constant.
85ce1d6 is described below

commit 85ce1d6226e30235782e2ebf9cfdea99b97adb45
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon Aug 10 16:47:05 2020 -0400

    GitHub build should reuse the POM default goal which now uses "package"
    instead of "verify". We need package to call japicmp:cmp.
    Display Maven version for GitHub builds.
    Drop Checktyle allowUndeclaredRTE.
    Checkstyle: Refacor magic number into a constant.
---
 .github/workflows/maven.yml                                           | 3 +--
 checkstyle.xml                                                        | 1 -
 pom.xml                                                               | 2 +-
 .../org/apache/commons/validator/routines/InetAddressValidator.java   | 4 +++-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index c202e3a..0779881 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -37,5 +37,4 @@ jobs:
       with:
         java-version: ${{ matrix.java }}
     - name: Build with Maven
-      run: mvn --batch-mode apache-rat:check javadoc:javadoc -Ddoclint=all 
package --file pom.xml --no-transfer-progress
-#      run: mvn --batch-mode apache-rat:check package --file pom.xml
+      run: mvn -V --batch-mode -Ddoclint=all --file pom.xml 
--no-transfer-progress
diff --git a/checkstyle.xml b/checkstyle.xml
index a776bf0..8434da7 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -90,7 +90,6 @@
     </module>
     <module name="JavadocMethod"> <!-- also covers Item 44 -->
       <property name="scope" value="protected"/>
-      <property name="allowUndeclaredRTE" value="true"/>
     </module>
     <module name="JavadocVariable">
       <property name="scope" value="protected"/>
diff --git a/pom.xml b/pom.xml
index 598e467..50bebfa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@
   </distributionManagement>
 
   <build>
-    <defaultGoal>clean verify apache-rat:check checkstyle:check 
javadoc:javadoc</defaultGoal>
+    <defaultGoal>clean package apache-rat:check japicmp:cmp checkstyle:check 
javadoc:javadoc</defaultGoal>
     <resources>
       <resource>
         <directory>${basedir}</directory>
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 c24034b..a10a8bc 100644
--- 
a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
+++ 
b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
@@ -36,6 +36,8 @@ import java.util.List;
  */
 public class InetAddressValidator implements Serializable {
 
+    private static final int MAX_BYTE = 128;
+
     private static final int IPV4_MAX_OCTET_VALUE = 255;
 
     private static final int MAX_UNSIGNED_SHORT = 0xffff;
@@ -135,7 +137,7 @@ public class InetAddressValidator implements Serializable {
         if (parts.length == 2) {
             if (parts[1].matches("\\d{1,3}")) { // Need to eliminate signs
                 int bits = Integer.parseInt(parts[1]); // cannot fail because 
of RE check
-                if (bits < 0 || bits > 128) {
+                if (bits < 0 || bits > MAX_BYTE) {
                     return false; // out of range
                 }
             } else {

Reply via email to