moved parameters declaration after the initial check for null or empty strings

master
Mohammed Le Doze 15 years ago
parent 2ac7df338e
commit 5367907eee

@ -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);

Loading…
Cancel
Save