check if session id is null before trying to return it as ESString

This commit is contained in:
hns 2001-05-14 14:41:14 +00:00
parent b2ac4ac000
commit 3c2e97fd20

View file

@ -47,7 +47,10 @@ public class ESUser extends ESNode {
return new ESString (user.uid); return new ESString (user.uid);
} }
if ("sessionID".equals (propname)) { 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); return super.getProperty (propname, hash);
} }