1
0
mirror of https://github.com/crawler-commons/crawler-commons synced 2024-09-23 01:20:45 +02:00
crawler-commons/src
Aurelien Violette e802cfa8eb In case of the use of a different locale, price tag can be formatted with ',' instead of '.' leading to a NPE.
NPE is generated because parseFloat returns a Float object that can be set null in case of NumberFormatException, but the VideoPrice accepts only float.
To bypass this issue and avoid reccuring errors, I've moved the VideoPrice price field to a Float object instead accepting null in case of.

It is far from ideal, and parseFloat would enjoy being able to parse different locale formatting. Anyway, in a first quick fix, this allows the rest of the file to be parsed,
whereas the previous error had all the file to fail while parsing.
2018-12-03 12:44:15 +01:00
..
main In case of the use of a different locale, price tag can be formatted with ',' instead of '.' leading to a NPE. 2018-12-03 12:44:15 +01:00
test In case of the use of a different locale, price tag can be formatted with ',' instead of '.' leading to a NPE. 2018-12-03 12:44:15 +01:00