Newest fred does not throw anymore.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / JsonPage.java
index b9bdc77..4fb885d 100644 (file)
@@ -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;
        }
 
        /**