On Wed, 24 Jun 2026 at 13:02, Gary Gregory <[email protected]> wrote: > > This can't be a good idea. Deprecated APIs MUST still be tested!
Perhaps true for the Validator methods, but they are just renames. > What am I missing? The other deprecations are in CSV, which is a separate component. > Gary > > On Wed, Jun 24, 2026 at 7:39 AM <[email protected]> wrote: > > > > This is an automated email from the ASF dual-hosted git repository. > > > > asf-gitbox-commits 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 1cfcfc9b Fix deprecations in test classes > > 1cfcfc9b is described below > > > > commit 1cfcfc9bc8564584c2d300dc78262ef6fa174cfe > > Author: Sebb <[email protected]> > > AuthorDate: Wed Jun 24 12:38:58 2026 +0100 > > > > Fix deprecations in test classes > > --- > > src/changes/changes.xml | 1 + > > src/test/java/org/apache/commons/validator/ValidatorTest.java | 4 ++-- > > .../org/apache/commons/validator/routines/IBANValidatorTest.java | 8 > > ++++---- > > 3 files changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/src/changes/changes.xml b/src/changes/changes.xml > > index a5821a44..cc072d21 100644 > > --- a/src/changes/changes.xml > > +++ b/src/changes/changes.xml > > @@ -91,6 +91,7 @@ The <action> type attribute can be add,update,fix,remove. > > <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary > > Gregory">Preserve exact value in BigDecimal and BigInteger validate > > (#406).</action> > > <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary > > Gregory">Preserve fractional bound in BigIntegerValidator range checks > > (#407).</action> > > <action type="fix" dev="sebb" > > due-to="sahvx655-wq">DomainValidatorTest: ensure CC is in correct list > > (#409).</action> > > + <action type="fix" dev="sebb">Fix deprecations in test > > classes.</action> > > <!-- ADD --> > > <action type="add" dev="ggregory" due-to="Gary Gregory">Add and use > > CheckDigitException.CheckDigitException(String, Object...) (#389).</action> > > <action type="add" dev="ggregory" due-to="Gary Gregory">Add and use > > ValidatorException.ValidatorException(Throwable). Call sites that > > previously called new ValidatorException(Throwable#getMessage()) now > > preserve that exception (#390).</action> > > diff --git a/src/test/java/org/apache/commons/validator/ValidatorTest.java > > b/src/test/java/org/apache/commons/validator/ValidatorTest.java > > index 3ae9e4ab..ffd02bbf 100644 > > --- a/src/test/java/org/apache/commons/validator/ValidatorTest.java > > +++ b/src/test/java/org/apache/commons/validator/ValidatorTest.java > > @@ -101,7 +101,7 @@ class ValidatorTest { > > > > final ValidatorAction va = new ValidatorAction(); > > va.setName(action); > > - va.setClassname("org.apache.commons.validator.ValidatorTest"); > > + va.setClassName("org.apache.commons.validator.ValidatorTest"); > > va.setMethod("formatDate"); > > > > va.setMethodParams("java.lang.Object,org.apache.commons.validator.Field"); > > > > @@ -185,7 +185,7 @@ class ValidatorTest { > > > > final ValidatorAction va = new ValidatorAction(); > > va.setName("capLetter"); > > - va.setClassname("org.apache.commons.validator.ValidatorTest"); > > + va.setClassName("org.apache.commons.validator.ValidatorTest"); > > va.setMethod("isCapLetter"); > > > > va.setMethodParams("java.lang.Object,org.apache.commons.validator.Field,java.util.List"); > > > > diff --git > > a/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java > > > > b/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java > > index 646db562..95c90898 100644 > > --- > > a/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java > > +++ > > b/src/test/java/org/apache/commons/validator/routines/IBANValidatorTest.java > > @@ -275,7 +275,7 @@ class IBANValidatorTest { > > static Collection<Arguments> ibanRegistrySource() throws Exception { > > final Path ibanRegistry = > > Paths.get(IBANValidator.class.getResource(IBAN_REGISTRY).toURI()); > > > > - final CSVFormat format = > > CSVFormat.DEFAULT.builder().setDelimiter('\t').build(); > > + final CSVFormat format = > > CSVFormat.DEFAULT.builder().setDelimiter('\t').get(); > > final Reader rdr = Files.newBufferedReader(ibanRegistry, > > IBAN_REGISTRY_CHARSET); > > > > CSVRecord country = null; > > @@ -284,7 +284,7 @@ class IBANValidatorTest { > > CSVRecord structure = null; > > CSVRecord length = null; > > > > - try (CSVParser p = new CSVParser(rdr, format)) { > > + try (CSVParser p = > > CSVParser.builder().setReader(rdr).setFormat(format).get()) { > > for (final CSVRecord o : p) { > > final String item = o.get(0); > > switch (item) { > > @@ -333,14 +333,14 @@ class IBANValidatorTest { > > static Collection<Arguments> ibanRegistrySourceExamples() throws > > Exception { > > final Path ibanRegistry = > > Paths.get(IBANValidator.class.getResource(IBAN_REGISTRY).toURI()); > > > > - final CSVFormat format = > > CSVFormat.DEFAULT.builder().setDelimiter('\t').build(); > > + final CSVFormat format = > > CSVFormat.DEFAULT.builder().setDelimiter('\t').get(); > > final Reader rdr = Files.newBufferedReader(ibanRegistry, > > IBAN_REGISTRY_CHARSET); > > > > CSVRecord country = null; > > CSVRecord electronicExample = null; > > CSVRecord lastUpdateDate = null; > > > > - try (CSVParser p = new CSVParser(rdr, format)) { > > + try (CSVParser p = > > CSVParser.builder().setReader(rdr).setFormat(format).get()) { > > for (final CSVRecord o : p) { > > final String item = o.get(0); > > switch (item) { > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
