Skip to content

Commit

Permalink
Deprecate GenericValidator.GenericValidator()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 28, 2024
1 parent 6dc6c13 commit 470c69c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Johannes Weberhofer">InetAddressValidator does not need its instance variable, so uses a touch less memory.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Pick up maven-antrun-plugin version from parent POM org.apache:apache.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate GenericTypeValidator.GenericTypeValidator().</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate GenericValidator.GenericValidator().</action>
<!-- ADD -->
<action type="add" issue="VALIDATOR-497" dev="sjaranowski" due-to="Slawomir Jaranowski">IBANValidator: add method validate with validation status</action>
<action type="add" dev="sebb">DomainValidatorTest: added Maven profile to simplfy execution.</action>
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/org/apache/commons/validator/GenericValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ public static boolean maxValue(final float value, final float max) {
return value <= max;
}

// See https://issues.apache.org/bugzilla/show_bug.cgi?id=29015 WRT the "value" methods

/**
* <p>Checks if the value is less than or equal to the max.</p>
*
Expand All @@ -354,6 +352,8 @@ public static boolean maxValue(final int value, final int max) {
return value <= max;
}

// See https://issues.apache.org/bugzilla/show_bug.cgi?id=29015 WRT the "value" methods

/**
* <p>Checks if the value is less than or equal to the max.</p>
*
Expand Down Expand Up @@ -433,4 +433,14 @@ public static boolean minValue(final long value, final long min) {
return value >= min;
}

/**
* Constructs a new instance.
*
* @deprecated Will be private in the next major version.
*/
@Deprecated
public GenericValidator() {
// empty
}

}

0 comments on commit 470c69c

Please sign in to comment.