aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/RootRedirects.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-12-27 14:05:23 +0700
committerGravatar Ugnich Anton2012-12-27 14:05:23 +0700
commit5b5bfc99bb7c17df265f9ed2d10b95bbbda864f6 (patch)
treec62026a1d687845e62b6115691bcab57e550cbd2 /src/java/com/juick/http/www/RootRedirects.java
parent831d62a90532967272ba63fb2b3dc74d262eb6a2 (diff)
bugfix
Diffstat (limited to 'src/java/com/juick/http/www/RootRedirects.java')
-rw-r--r--src/java/com/juick/http/www/RootRedirects.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/RootRedirects.java b/src/java/com/juick/http/www/RootRedirects.java
index d4e17972..21b0077e 100644
--- a/src/java/com/juick/http/www/RootRedirects.java
+++ b/src/java/com/juick/http/www/RootRedirects.java
@@ -31,7 +31,11 @@ public class RootRedirects {
protected void doGetPostID(Connection sql, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String strID = request.getRequestURI().substring(1);
- int mid = Integer.parseInt(strID);
+ int mid = 0;
+ try {
+ mid = Integer.parseInt(strID);
+ } catch (NumberFormatException e) {
+ }
if (mid > 0) {
com.juick.User author = com.juick.server.MessagesQueries.getMessageAuthor(sql, mid);
if (author != null) {