directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1414020 - /directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Date Tue, 27 Nov 2012 08:49:13 GMT
Author: elecharny
Date: Tue Nov 27 08:49:11 2012
New Revision: 1414020

URL: http://svn.apache.org/viewvc?rev=1414020&view=rev
Log:
Avoided a newInstance() call when we know about the class : call the constructor directly.

Modified:
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java?rev=1414020&r1=1414019&r2=1414020&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
(original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/builder/ServiceBuilder.java
Tue Nov 27 08:49:11 2012
@@ -1035,15 +1035,14 @@ public class ServiceBuilder
             {
                 if ( className == null )
                 {
-                    consumerClass = ReplicationConsumerImpl.class;
+                    consumer = new ReplicationConsumerImpl();
                 }
                 else
                 {
                     consumerClass = Class.forName( className );
+                    consumer = ( ReplicationConsumer ) consumerClass.newInstance();
                 }
 
-                consumer = ( ReplicationConsumer ) consumerClass.newInstance();
-
                 // we don't support any other configuration impls atm, but this configuration
should suffice for many needs
                 config = new SyncReplConfiguration();
 



Mime
View raw message