From: David ‘Bombe’ Roden Date: Tue, 23 Nov 2010 08:51:45 +0000 (+0100) Subject: Newest fred does not throw anymore. X-Git-Tag: 0.3.1-RC1~50 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=a9aafa22d72dd596f4686cda7fe2f17074235394 Newest fred does not throw anymore. --- 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; } /**