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

   fair point. NaN is a legitimate Double value and NumberFormat parses it by 
design, so rejecting it here is a behaviour change that could break callers who 
genuinely want to validate it. my reasoning was that a NaN which passes then 
slips past every isInRange/minValue check, since NaN compares false against 
everything, but on reflection that guard belongs to the caller, not this class. 
and as you spotted the infinity handling is already inconsistent (NaN and the ∞ 
symbol parse, +Infinity doesn't), which isn't something to paper over in this 
PR. happy to close this out, your edge-case test updates already pin the 
current behaviour as the sensible default.


-- 
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