Closed spring-projects-issues closed 15 years ago
["Ulrik Sandberg":https://jira.spring.io/secure/ViewProfile.jspa?name=ulsa] said:
The fact is that two more methods have the same problem:
bc.. public void search(final Name base, final String filter, final SearchControls controls, NameClassPairCallbackHandler handler) {
public void search(final String base, final String filter, final SearchControls controls,
NameClassPairCallbackHandler handler) {
p.
bc..
This issue is related to #146
["Ulrik Sandberg":https://jira.spring.io/secure/ViewProfile.jspa?name=ulsa](Migrated from ["LDAP-162":https://jira.spring.io/browse/LDAP-162?redirect=false]) said:
There are two more methods that fail to set returningObj to true when the given handler is of type ContextMapperCallbackHandler:
bc.. public void search(final Name base, final String filter, final SearchControls controls, NameClassPairCallbackHandler handler, DirContextProcessor processor) {
p.
As is described in the related issue, this results in a failure when the ContextMapper tries to retrieve the object from the search result, since it is null.
One might argue that since the controls are provided by the user, it would be the user's responsibility to set the flag. However, it is more robust if the framework does it. It is simple for the framework to check if the handler requires the flag and thus it will always make the correct decision. It's unnecessary to place that burden on the user. bc..