c-eg / themoviedbapi

A Java wrapper around the JSON API provided by TheMovieDB.org
https://www.themoviedb.org/
Other
281 stars 95 forks source link

fix: Make revenue long instead of int #214

Closed mckenziecallum closed 6 months ago

mckenziecallum commented 6 months ago

When trying to load some movies from TMDB I ran into an issue where revenue was larger than the allowed range for an Integer.

Unable to update media with TMDB ID 299534: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (2800000000) out of range of int (-2147483648 - 2147483647)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1205] (through reference chain: info.movito.themoviedbapi.model.movies.MovieDb["revenue"])

Updated the latest movies json to have a high revenue so this error will be caught if it regresses.

c-eg commented 6 months ago

Hi @mckenziecallum, thanks for the bugfix! Please could you also update the other test resources for the "revenue" key? I've attached a screenshot of all the occurrences, which are:

image

mckenziecallum commented 6 months ago

No problem, should all be updated now!

c-eg commented 6 months ago

Thanks! I've just released to maven central - version 2.0.4 should show within a couple of hours.