--- android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java 2011/04/19 16:39:07 1312 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/RequestPlotter.java 2011/04/19 16:46:39 1313 @@ -368,11 +368,20 @@ return (p != 0); } + int getCount(String param) { + if (param == null || param.equals("")) { + return 1; + } + + return Integer.parseInt(param); + } + + @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - int count = Integer.parseInt( req.getParameter("count") ); + int count = getCount( req.getParameter("count") ); if (count > 30) //limit to 30 days count = 30;