moved parameters declaration after the initial check for null or empty strings
This commit is contained in:
@@ -98,14 +98,13 @@ public class TheMovieDb {
|
||||
*/
|
||||
public MovieDB moviedbSearch(String movieTitle, String language) {
|
||||
MovieDB movie = null;
|
||||
Document doc = null;
|
||||
|
||||
language = validateLanguage(language);
|
||||
|
||||
// If the title is null, then exit
|
||||
if (movieTitle == null || movieTitle.equals(""))
|
||||
return movie;
|
||||
|
||||
Document doc = null;
|
||||
language = validateLanguage(language);
|
||||
|
||||
try {
|
||||
String searchUrl = buildSearchUrl("Movie.search", URLEncoder.encode(movieTitle, "UTF-8"), language);
|
||||
doc = DOMHelper.getEventDocFromUrl(searchUrl);
|
||||
|
||||
Reference in New Issue
Block a user