-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... BSON user
I want... valid numeric inputs to Long.fromString to not be coerced
So that... my data isn't corrupted
Acceptance Criteria
Implementation Requirements
- when radix is >=24, and input is 'NaN' return numeric value
- ex: in radix 26, 'NaN' represents 17060 in decimal
- when radix is >=35 and input is '+Infinity', '-Infinity', or 'Infinity', return numeric value
- otherwise with 'NaN', '+Infinity', '-Infinity', or 'Infinity' inputs, coerce to Long.ZERO
Testing Requirements
- add unit tests for +Infinity, -Infinity, Infinity, with radixes <35 and >=35
- add unit tests for NaN, with radixes < 24 and >=24