-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSVDecoder: No Long and Int out of range exceptions #485
Comments
Quick question: which Jackson version is this with? If not 2.17(.2), then would be good to verify issue with 2.17.2. Aside from that: just to make sure -- you would like to get an appropriate exception for value overflow wrt |
@cowtowncoder hi
and jackson-dataformat-csv: 2.17.2 Yes, that's right, I would like to receive an error about the overflow of Int and Long values |
2.18.0 would be |
Ok, was able to reproduce the issue; adding failing test via #487. |
Fixed, to be include in 2.18.0. Oddly enough, coercion limits were enforced if converting from floating-point values. |
I have a problem when I try to process a CSV file entered by the user.
If the numeric values are outside the limits of Int or Long, then there is no way I can notify the user about incorrect values that are too large.
Values are corrupted by
_getBigInteger().intValue()
and_getBigInteger().longValue()
in CsvDecoderAnd no error occurs
Is it possible to use the methods
_getBigInteger().intValueExact()
and_getBigInteger().longValueExact()
which check boundaries and cause an error?Example (Kotlin):
CSV file:
Entity:
ER: some error message like jackson ObjectMapper
Numeric value (111111111111111111111111111111111111111111) out of range of int
AR: Values corrupted
I use
The text was updated successfully, but these errors were encountered: