This is an automated email from the ASF dual-hosted git repository.

garydgregory 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 942c7145 Reject fractional exponent input in BigIntegerValidator 
(#418).
942c7145 is described below

commit 942c7145ae8502eadc5f51af495a60f00e13eac4
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jul 11 07:16:53 2026 -0400

    Reject fractional exponent input in BigIntegerValidator (#418).
---
 src/changes/changes.xml                                                 | 1 +
 .../org/apache/commons/validator/routines/BigIntegerValidatorTest.java  | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 55b67082..baf43c92 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -100,6 +100,7 @@ The <action> type attribute can be add,update,fix,remove.
     <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary 
Gregory">Reject vowels in SedolCheckDigit (#415).</action>
     <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary 
Gregory">Compare exact bound in AbstractNumberValidator range checks 
(#416).</action>
     <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary 
Gregory">Reject fractional scientific notation in ShortValidator 
(#417).</action>
+    <action type="fix" dev="ggregory" due-to="sahvx655-wq, Gary 
Gregory">Reject fractional exponent input in BigIntegerValidator 
(#418).</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/routines/BigIntegerValidatorTest.java
 
b/src/test/java/org/apache/commons/validator/routines/BigIntegerValidatorTest.java
index 00e51e45..4a7b9ea0 100644
--- 
a/src/test/java/org/apache/commons/validator/routines/BigIntegerValidatorTest.java
+++ 
b/src/test/java/org/apache/commons/validator/routines/BigIntegerValidatorTest.java
@@ -136,6 +136,8 @@ class BigIntegerValidatorTest extends 
AbstractNumberValidatorTest {
         // the primitive integer validators already reject these
         assertNull(IntegerValidator.getInstance().validate("15E-1"));
         assertNull(LongValidator.getInstance().validate("15E-1"));
+        assertNull(ShortValidator.getInstance().validate("15E-1"));
+        assertNull(ByteValidator.getInstance().validate("15E-1"));
         // a whole number written with an exponent stays valid
         assertEquals(new BigInteger("100"), instance.validate("1E2"));
         // the lenient (non-strict) validator still truncates trailing 
fraction digits

Reply via email to