Skip to content

Commit

Permalink
Removed unneeded null check for the page
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjomckay committed Sep 8, 2024
1 parent cc6f99b commit 3356512
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/info/movito/themoviedbapi/TmdbTrending.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public MultiResultsPage getAll(TimeWindow timeWindow, String language) throws Tm
public MultiResultsPage getAll(TimeWindow timeWindow, String language, Integer page) throws TmdbException {
ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_TRENDING, "all", timeWindow.getValue());
apiUrl.addLanguage(language);
apiUrl.addPage(page == null ? 1 : page);
apiUrl.addPage(page);
return mapJsonResult(apiUrl, MultiResultsPage.class);
}

Expand Down Expand Up @@ -78,7 +78,7 @@ public MovieResultsPage getMovies(TimeWindow timeWindow, String language) throws
public MovieResultsPage getMovies(TimeWindow timeWindow, String language, Integer page) throws TmdbException {
ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_TRENDING, "movie", timeWindow.getValue());
apiUrl.addLanguage(language);
apiUrl.addPage(page == null ? 1 : page);
apiUrl.addPage(page);
return mapJsonResult(apiUrl, MovieResultsPage.class);
}

Expand Down Expand Up @@ -108,7 +108,7 @@ public PopularPersonResultsPage getPeople(TimeWindow timeWindow, String language
public PopularPersonResultsPage getPeople(TimeWindow timeWindow, String language, Integer page) throws TmdbException {
ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_TRENDING, "person", timeWindow.getValue());
apiUrl.addLanguage(language);
apiUrl.addPage(page == null ? 1 : page);
apiUrl.addPage(page);
return mapJsonResult(apiUrl, PopularPersonResultsPage.class);
}

Expand Down Expand Up @@ -138,7 +138,7 @@ public TvSeriesResultsPage getTv(TimeWindow timeWindow, String language) throws
public TvSeriesResultsPage getTv(TimeWindow timeWindow, String language, Integer page) throws TmdbException {
ApiUrl apiUrl = new ApiUrl(TMDB_METHOD_TRENDING, "tv", timeWindow.getValue());
apiUrl.addLanguage(language);
apiUrl.addPage(page == null ? 1 : page);
apiUrl.addPage(page);
return mapJsonResult(apiUrl, TvSeriesResultsPage.class);
}
}

0 comments on commit 3356512

Please sign in to comment.