sahvx655-wq commented on PR #419:
URL: 
https://github.com/apache/commons-validator/pull/419#issuecomment-4942657237

   Both added. The negative mirror is worth having since the skew flips sign: 
-1e20f prints closer to zero than the value it actually holds, so on the 
unpatched path a value sitting between the two magnitudes was wrongly admitted 
by maxValue and wrongly failed minValue, the opposite direction to the positive 
case. The new block in testNumberRangeFloatBound derives its fixture from the 
float itself, same as the positive case.
   
   On the non-finite side I traced the call path first: a Float NaN or infinity 
never reaches toBigDecimal, because the isFinite guard in the range overloads 
already branches on Float as well as Double, so those operands are delegated to 
the plain double comparison rather than rejected with an exception. In practice 
a NaN bound is never satisfied and an infinity behaves as an open bound; I've 
extended testNumberRangeNonFiniteBound to assert that for Float explicitly so 
the delegation is pinned down rather than implied. Full suite still green, 1113 
tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to