Catch nullpointerexception on NoCore.getUser, convert into
SessionExpired
This commit is contained in:
1 parent
b270be5795
commit
6b12e42f0c
1 file changed
+4
@@ -119,7 +119,11 @@ public final class NoSessionSphere {
|
|||||||
UUID uuid = NoSession.decryptUUID(encryptedUUID);
|
UUID uuid = NoSession.decryptUUID(encryptedUUID);
|
||||||
if (NoSessionSphere.sessions.containsKey(uuid)) {
|
if (NoSessionSphere.sessions.containsKey(uuid)) {
|
||||||
NoSessionSphere.pruneSingle(uuid);
|
NoSessionSphere.pruneSingle(uuid);
|
||||||
|
try {
|
||||||
return NoSessionSphere.sessions.get(uuid).getNoUser();
|
return NoSessionSphere.sessions.get(uuid).getNoUser();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
throw new NoSessionExpiredException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
throw new NoSessionExpiredException();
|
throw new NoSessionExpiredException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user