Commit dddb5e13 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Removed exceptions on getSession()


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@591 b35dd754-fafc-0310-a699-88a17e54d16e
parent be32e4e8
...@@ -65,8 +65,6 @@ public class SessionManager implements ConnectionCloseListener { ...@@ -65,8 +65,6 @@ public class SessionManager implements ConnectionCloseListener {
private static SessionManager singleton; private static SessionManager singleton;
private static final Object LOCK = new Object(); private static final Object LOCK = new Object();
private Map packetSessionMap = new HashMap();
/** /**
* Returns the singleton instance of <CODE>SessionManagerImpl</CODE>, * Returns the singleton instance of <CODE>SessionManagerImpl</CODE>,
* <p/> * <p/>
...@@ -467,14 +465,12 @@ public class SessionManager implements ConnectionCloseListener { ...@@ -467,14 +465,12 @@ public class SessionManager implements ConnectionCloseListener {
* Returns the session responsible for this JID. * Returns the session responsible for this JID.
* @param from the sender of the packet. * @param from the sender of the packet.
* @return the <code>Session</code> associated with the JID. * @return the <code>Session</code> associated with the JID.
* @throws UnauthorizedException
* @throws SessionNotFoundException
*/ */
public Session getSession(JID from) throws UnauthorizedException, SessionNotFoundException { public Session getSession(JID from) {
Session session = null; Session session = null;
String resource = from.getResource(); String resource = from.getResource();
if (resource == null) { if (resource == null) {
throw new SessionNotFoundException(); return null;
} }
String username = from.getNode(); String username = from.getNode();
if (username == null || "".equals(username)) { if (username == null || "".equals(username)) {
...@@ -500,7 +496,7 @@ public class SessionManager implements ConnectionCloseListener { ...@@ -500,7 +496,7 @@ public class SessionManager implements ConnectionCloseListener {
} }
} }
if (session == null) { if (session == null) {
throw new SessionNotFoundException(); return null;
} }
return session; return session;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment