Le 30/01/2017 à 11:37, [email protected] a écrit :
> We don't directly send DSML, we have a custom version of Dsmlv2Engine
> that uses org.apache.directory.api.dsmlv2.Dsmlv2Parser. The issue only
> occurs if we provide the sort control, the code we have is working
> otherwise.

Yeah, sorry for having looked at the stack trace a bit too quickly.

DsmlControl don't have a type, while the various control factories are
expecting to work with a typed control like :

    public class SortRequestFactory implements ControlFactory<SortRequest>

Obviously, converting a DSMLControl, which definition is :

    public class DsmlControl<C extends Control> implements Control,
DsmlDecorator<C>

won't work because the factory expect a SortRequest instance.

Changing the factory to be :

    public class SortRequestFactory implements ControlFactory<Control>

would be better. Another (more 'typed') solution would be to create some
specific DSML control (ie, a SortRequestDsmlControl, etc)

Checking if it does not break the API code atm.

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org

Reply via email to