From 470c69c53e87aed08d62b60894a8ed400d5994f0 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Sat, 28 Dec 2024 11:39:42 -0500 Subject: [PATCH] Deprecate GenericValidator.GenericValidator() --- src/changes/changes.xml | 1 + .../apache/commons/validator/GenericValidator.java | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 4fa2bc14b..5f850f0ca 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -71,6 +71,7 @@ The type attribute can be add,update,fix,remove. InetAddressValidator does not need its instance variable, so uses a touch less memory. Pick up maven-antrun-plugin version from parent POM org.apache:apache. Deprecate GenericTypeValidator.GenericTypeValidator(). + Deprecate GenericValidator.GenericValidator(). IBANValidator: add method validate with validation status DomainValidatorTest: added Maven profile to simplfy execution. diff --git a/src/main/java/org/apache/commons/validator/GenericValidator.java b/src/main/java/org/apache/commons/validator/GenericValidator.java index a57a20476..837887bbd 100644 --- a/src/main/java/org/apache/commons/validator/GenericValidator.java +++ b/src/main/java/org/apache/commons/validator/GenericValidator.java @@ -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 - /** *

Checks if the value is less than or equal to the max.

* @@ -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 + /** *

Checks if the value is less than or equal to the max.

* @@ -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 + } + }