NIHVIVO-1232 fix NullPointerException when there is no session.
This commit is contained in:
parent
d53a900e11
commit
a08706c212
1 changed files with 4 additions and 0 deletions
|
@ -215,6 +215,10 @@ public class SelfEditingIdentifierFactory implements IdentifierBundleFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
private IdentifierBundle getFromSession(ServletRequest req, HttpSession session ){
|
private IdentifierBundle getFromSession(ServletRequest req, HttpSession session ){
|
||||||
|
if (session == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
NetId netid = (NetId)session.getAttribute(NETID_IN_SESSION);
|
NetId netid = (NetId)session.getAttribute(NETID_IN_SESSION);
|
||||||
SelfEditing sed = (SelfEditing)session.getAttribute(URI_IN_SESSION);
|
SelfEditing sed = (SelfEditing)session.getAttribute(URI_IN_SESSION);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue