From a9aafa22d72dd596f4686cda7fe2f17074235394 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 23 Nov 2010 09:51:45 +0100 Subject: [PATCH] Newest fred does not throw anymore. --- .../java/net/pterodactylus/sone/web/SoneTemplatePage.java | 12 ++++-------- src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index 33c86a9..496fb60 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -109,15 +109,11 @@ public class SoneTemplatePage extends TemplatePage { * session */ protected Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { - try { - Session session = webInterface.getSessionManager().useSession(toadletContenxt); - if (create && (session == null)) { - session = webInterface.getSessionManager().createSession(UUID.randomUUID().toString(), toadletContenxt); - } - return session; - } catch (freenet.clients.http.RedirectException re1) { - return null; + Session session = webInterface.getSessionManager().useSession(toadletContenxt); + if (create && (session == null)) { + session = webInterface.getSessionManager().createSession(UUID.randomUUID().toString(), toadletContenxt); } + return session; } /** diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java index b9bdc77..4fb885d 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/JsonPage.java @@ -84,15 +84,11 @@ public abstract class JsonPage implements Page { * session */ protected Session getCurrentSession(ToadletContext toadletContenxt, boolean create) { - try { - Session session = webInterface.getSessionManager().useSession(toadletContenxt); - if (create && (session == null)) { - session = webInterface.getSessionManager().createSession(UUID.randomUUID().toString(), toadletContenxt); - } - return session; - } catch (freenet.clients.http.RedirectException re1) { - return null; + Session session = webInterface.getSessionManager().useSession(toadletContenxt); + if (create && (session == null)) { + session = webInterface.getSessionManager().createSession(UUID.randomUUID().toString(), toadletContenxt); } + return session; } /** -- 2.7.4