--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2010/02/08 20:54:49 590 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/DepartureFetcher.java 2010/02/10 14:07:04 591 @@ -6,6 +6,7 @@ import java.util.Map; import java.util.logging.Logger; +import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.DomNodeList; import com.gargoylesoftware.htmlunit.html.HtmlElement; @@ -81,7 +82,7 @@ List departureList = new ArrayList(); - final WebClient webClient = new WebClient(); + final WebClient webClient = new WebClient( BrowserVersion.FIREFOX_3 ); webClient.setTimeout(2500); webClient.setJavaScriptEnabled(false); @@ -137,6 +138,7 @@ } else { logger.warning("No departures found for station=" + stationcode + ", type=" + type); } + webClient.closeAllWindows(); return departureList; } @@ -145,7 +147,7 @@ List departureList = new ArrayList(); - final WebClient webClient = new WebClient(); + final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3); webClient.setTimeout(2500); webClient.setJavaScriptEnabled(false); @@ -201,6 +203,8 @@ } else { logger.warning("No departures found for station=" + stationcode + ", type=" + type); } + webClient.closeAllWindows(); + return departureList; } @@ -249,7 +253,6 @@ } - return number; }