X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FSoneTemplatePage.java;h=496fb60a77b4104f37abe95aab782fb726d8f5aa;hp=33c86a9a4a01179fc88f75716589c83fdded1096;hb=a9aafa22d72dd596f4686cda7fe2f17074235394;hpb=51cdfee0b350955d9f858adb892f18b2a4fa8ab4 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; } /**