You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/09/10 11:36:40 UTC
svn commit: r995721 -
/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
Author: elecharny
Date: Fri Sep 10 09:36:39 2010
New Revision: 995721
URL: http://svn.apache.org/viewvc?rev=995721&view=rev
Log:
No need to add a ldapServer field, it's a static class...
Modified:
directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
Modified: directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java?rev=995721&r1=995720&r2=995721&view=diff
==============================================================================
--- directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/server-annotations/src/main/java/org/apache/directory/server/factory/ServerAnnotationProcessor.java Fri Sep 10 09:36:39 2010
@@ -48,10 +48,6 @@ import org.junit.runner.Description;
*/
public class ServerAnnotationProcessor
{
- /** The created LDAP Server */
- private static LdapServer ldapServer;
-
-
private static void createTransports( LdapServer ldapServer, CreateTransport[] transportBuilders, int startPort )
{
if ( transportBuilders.length != 0 )
@@ -186,15 +182,6 @@ public class ServerAnnotationProcessor
/**
- * @return The created instance of LdapServer, if any
- */
- public static LdapServer getLdapServer()
- {
- return ldapServer;
- }
-
-
- /**
* Create a new instance of LdapServer
*
* @param directoryService The associated DirectoryService
@@ -207,9 +194,7 @@ public class ServerAnnotationProcessor
CreateLdapServer createLdapServer = ( CreateLdapServer ) getAnnotation( CreateLdapServer.class );
// Ok, we have found a CreateLdapServer annotation. Process it now.
- ldapServer = createLdapServer( createLdapServer, directoryService, startPort );
-
- return ldapServer;
+ return createLdapServer( createLdapServer, directoryService, startPort );
}
@@ -228,11 +213,10 @@ public class ServerAnnotationProcessor
CreateLdapServer createLdapServer = description.getAnnotation( CreateLdapServer.class );
// Ok, we have found a CreateLdapServer annotation. Process it now.
- ldapServer = createLdapServer( createLdapServer, directoryService, startPort );
-
- return ldapServer;
+ return createLdapServer( createLdapServer, directoryService, startPort );
}
+
@SuppressWarnings("unchecked")
private static Annotation getAnnotation( Class annotationClass ) throws Exception
{