directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r485179 - in /directory/trunks/apacheds/mitosis/src: main/java/org/apache/directory/mitosis/common/ main/java/org/apache/directory/mitosis/service/ test/java/org/apache/directory/mitosis/service/
Date Sun, 10 Dec 2006 13:11:38 GMT
Author: trustin
Date: Sun Dec 10 05:11:37 2006
New Revision: 485179

URL: http://svn.apache.org/viewvc?view=rev&rev=485179
Log:
Fixed compiler warnings

Modified:
    directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/Replica.java
    directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
    directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/SimpleReplicationContext.java
    directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceIntegrationTest.java

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/Replica.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/Replica.java?view=diff&rev=485179&r1=485178&r2=485179
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/Replica.java
(original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/common/Replica.java
Sun Dec 10 05:11:37 2006
@@ -54,7 +54,7 @@
      * 
      * <replicaId>@<server>:<port>
      * 
-     * @param The replica to create
+     * @param replica The replica to create
      */
     public Replica( String replica )
     {

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java?view=diff&rev=485179&r1=485178&r2=485179
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
(original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/ClientConnectionManager.java
Sun Dec 10 05:11:37 2006
@@ -138,7 +138,7 @@
             while ( i.hasNext() )
             {
                 Replica replica = ( Replica ) i.next();
-                Connection con = ( Connection ) sessions.get( replica.getId() );
+                Connection con = sessions.get( replica.getId() );
                 if ( con == null )
                 {
                     con = new Connection();
@@ -192,7 +192,7 @@
                 // Someone might have modified the configuration,
                 // and therefore we try to detect newly added replicas.
                 Replica replica = ( Replica ) i.next();
-                Connection con = ( Connection ) sessions.get( replica.getId() );
+                Connection con = sessions.get( replica.getId() );
                 if ( con == null )
                 {
                     con = new Connection();

Modified: directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/SimpleReplicationContext.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/SimpleReplicationContext.java?view=diff&rev=485179&r1=485178&r2=485179
==============================================================================
--- directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/SimpleReplicationContext.java
(original)
+++ directory/trunks/apacheds/mitosis/src/main/java/org/apache/directory/mitosis/service/SimpleReplicationContext.java
Sun Dec 10 05:11:37 2006
@@ -152,7 +152,7 @@
                     "Only clients can begin replication." );
         }
         
-        ReplicationContextHandler contextHandler = ( ( ReplicationProtocolHandler ) handler
).getContextHandler();
+        ReplicationContextHandler contextHandler = handler.getContextHandler();
         return ( ( ReplicationClientContextHandler ) contextHandler ).beginReplication( this
);
     }
 
@@ -184,7 +184,7 @@
         ExpirationTask task;
         synchronized ( expirableMessages )
         {
-            task = ( ExpirationTask ) expirableMessages.remove( new Integer( sequence ) );
+            task = expirableMessages.remove( new Integer( sequence ) );
         }
         return task;
     }

Modified: directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceIntegrationTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceIntegrationTest.java?view=diff&rev=485179&r1=485178&r2=485179
==============================================================================
--- directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceIntegrationTest.java
(original)
+++ directory/trunks/apacheds/mitosis/src/test/java/org/apache/directory/mitosis/service/ReplicationServiceIntegrationTest.java
Sun Dec 10 05:11:37 2006
@@ -44,13 +44,12 @@
 import org.apache.directory.mitosis.common.ReplicaId;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.configuration.InterceptorConfiguration;
 import org.apache.directory.server.core.configuration.MutableInterceptorConfiguration;
 import org.apache.directory.server.core.configuration.MutableStartupConfiguration;
 import org.apache.directory.server.core.configuration.ShutdownConfiguration;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.mina.util.AvailablePortFinder;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * A test case for {@link ReplicationServiceIntegrationTest}
@@ -60,8 +59,6 @@
  */
 public class ReplicationServiceIntegrationTest extends TestCase
 {
-    private final Logger log = LoggerFactory.getLogger( ReplicationServiceIntegrationTest.class
);
-
     private Map contexts = new HashMap();
     private Map replicationServices = new HashMap();
 
@@ -123,6 +120,7 @@
         return ( String ) attr.get();
     }
 
+    @SuppressWarnings("unchecked")
     private void createReplicas( String[] names ) throws Exception
     {
         int lastAvailablePort = 1024;
@@ -156,7 +154,7 @@
             ldapCfg.setShutdownHookEnabled( false );
             ldapCfg.setWorkingDirectory( workDir );
 
-            List interceptorCfgs = ldapCfg.getInterceptorConfigurations();
+            List<InterceptorConfiguration> interceptorCfgs = ldapCfg.getInterceptorConfigurations();
 
             ReplicationConfiguration replicationCfg = new ReplicationConfiguration();
             replicationCfg.setReplicaId( replica.getId() );
@@ -213,14 +211,7 @@
         return context;
     }
     
-    private void replicate( String name ) throws Exception
-    {
-        Thread.sleep( 2500 );
-        ReplicationService service = ( ReplicationService ) replicationServices.get( name
);
-        service.replicate();
-        Thread.sleep( 2500 );
-    }
-
+    @SuppressWarnings("unchecked")
     private void destroyAllReplicas() throws Exception
     {
         for( Iterator i = contexts.keySet().iterator(); i.hasNext(); )



Mime
View raw message