check if session id is null before trying to return it as ESString
This commit is contained in:
parent
b2ac4ac000
commit
3c2e97fd20
1 changed files with 4 additions and 1 deletions
|
@ -47,7 +47,10 @@ public class ESUser extends ESNode {
|
|||
return new ESString (user.uid);
|
||||
}
|
||||
if ("sessionID".equals (propname)) {
|
||||
return new ESString (user.getSessionID ());
|
||||
if (user == null || user.getSessionID () == null)
|
||||
return ESNull.theNull;
|
||||
else
|
||||
return new ESString (user.getSessionID ());
|
||||
}
|
||||
return super.getProperty (propname, hash);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue