directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mårten Gustafson (JIRA) <>
Subject [jira] [Created] (DIRSERVER-1730) DSAnnotationProcessor doesn't correctly set up authenticators
Date Sun, 03 Jun 2012 14:57:22 GMT
Mårten Gustafson created DIRSERVER-1730:

             Summary: DSAnnotationProcessor doesn't correctly set up authenticators
                 Key: DIRSERVER-1730
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: core
    Affects Versions: 2.0.0-M8
            Reporter: Mårten Gustafson
            Priority: Trivial

I've been playing around with a custom authenticator but has had trouble getting my unit tests
to work.

I wrote a test like this:

@CreateDS(authenticators = { @CreateAuthenticator(type = MyTestAuthenticator.class) })
@CreateLdapServer(transports = { @CreateTransport(protocol = "LDAP", address = "",
port = 9631) })
public class ATest extends AbstractLdapTestUnit {
    public void testTheAuthenticator() { ... }

But my custom authenticator was never invoked. I now think that I've managed to track this
down to a bug in DSAnnotationProcessor in which the method DSAnnotationProcessor.createDS()
never registers the authenticators with the DirectoryService.

The authenticators are processed and added to a set but that set is never used, this is the
relevant block of code:

Adding the following two lines of code before line 124 seems to solve the problem:

Here's a commit fixing the problem and adding a unit test to verify that authenticators get
properly registered:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message