On Wed, Aug 20, 2008 at 1:09 AM, Emmanuel Lecharny <firstname.lastname@example.org>
This is to have a direct access to the ldapSession instance from the ldapServer. If we don't do that, we have to look into the session map to get access to it, which is a little bit more complex.
Alex Karasulu wrote:
You're calling session.setLdapServer() on sessions when you're getting them
from the LdapServer in the first place. Take a look at line 120 of
LdapRequestHandler to see. I was wondering should not this already be set
when you get the LdapSession from the LdapServer?
Now, the question is why is it not set when the session is created the first time ? The LdapSession instance is created in the LdapProcotolHandler class in ldapServer.
Yeah why don't we set it. Creating this field then not having it set on creation leaves us to have to set this value explicitly. Just seems like a great way to have a NPE creep up after some refactoring later on.