directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r606907 - in /directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis: operation/ service/ service/protocol/handler/ store/ store/derby/
Date Wed, 26 Dec 2007 15:26:44 GMT
Author: elecharny
Date: Wed Dec 26 07:26:43 2007
New Revision: 606907

URL: http://svn.apache.org/viewvc?rev=606907&view=rev
Log:
Replaced some import ...*; by the explicit declaration of the imported elements.
Removed some warnings with generics

Modified:
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java
    directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/operation/OperationFactory.java
Wed Dec 26 07:26:43 2007
@@ -19,7 +19,11 @@
  */
 package org.apache.directory.mitosis.operation;
 
-import org.apache.directory.mitosis.common.*;
+import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.mitosis.common.CSNFactory;
+import org.apache.directory.mitosis.common.Constants;
+import org.apache.directory.mitosis.common.ReplicaId;
+import org.apache.directory.mitosis.common.UUIDFactory;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
@@ -40,7 +44,13 @@
 import javax.naming.NameAlreadyBoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
 import java.util.List;
 
 

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/ReplicationInterceptor.java
Wed Dec 26 07:26:43 2007
@@ -20,7 +20,10 @@
 package org.apache.directory.mitosis.service;
 
 
-import org.apache.directory.mitosis.common.*;
+import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.mitosis.common.Constants;
+import org.apache.directory.mitosis.common.DefaultCSN;
+import org.apache.directory.mitosis.common.ReplicaId;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.operation.Operation;
 import org.apache.directory.mitosis.operation.OperationFactory;
@@ -34,7 +37,17 @@
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.*;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
+import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
+import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
+import org.apache.directory.server.core.interceptor.context.ListOperationContext;
+import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.invocation.InvocationStack;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -56,7 +69,12 @@
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.directory.*;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
 import java.net.InetSocketAddress;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -306,7 +324,8 @@
         }
 
         // Iterate all context partitions to send all entries of them.
-        NamingEnumeration e = namingContextsAttr.getAll();
+        NamingEnumeration<?> e = namingContextsAttr.getAll();
+        
         while ( e.hasMore() )
         {
             Object value = e.next();
@@ -346,6 +365,7 @@
             {
                 SearchResult sr = e.next();
                 LdapDN name = new LdapDN( sr.getName() );
+                
                 if ( name.size() > contextName.size() )
                 {
                     names.add( new LdapDN( sr.getName() ) );

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationClientContextHandler.java
Wed Dec 26 07:26:43 2007
@@ -20,14 +20,26 @@
 package org.apache.directory.mitosis.service.protocol.handler;
 
 
-import org.apache.directory.mitosis.common.*;
+import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.mitosis.common.CSNVector;
+import org.apache.directory.mitosis.common.DefaultCSN;
+import org.apache.directory.mitosis.common.Replica;
+import org.apache.directory.mitosis.common.ReplicaId;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.operation.AddEntryOperation;
 import org.apache.directory.mitosis.operation.Operation;
 import org.apache.directory.mitosis.service.ReplicationContext;
 import org.apache.directory.mitosis.service.ReplicationContext.State;
 import org.apache.directory.mitosis.service.protocol.Constants;
-import org.apache.directory.mitosis.service.protocol.message.*;
+import org.apache.directory.mitosis.service.protocol.message.BaseMessage;
+import org.apache.directory.mitosis.service.protocol.message.BeginLogEntriesAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.BeginLogEntriesMessage;
+import org.apache.directory.mitosis.service.protocol.message.EndLogEntriesAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.EndLogEntriesMessage;
+import org.apache.directory.mitosis.service.protocol.message.LogEntryAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.LogEntryMessage;
+import org.apache.directory.mitosis.service.protocol.message.LoginAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.LoginMessage;
 import org.apache.directory.mitosis.store.ReplicationLogIterator;
 import org.apache.directory.mitosis.store.ReplicationStore;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
@@ -345,7 +357,8 @@
         }
 
         // Iterate all context partitions to send all entries of them.
-        NamingEnumeration e = namingContextsAttr.getAll();
+        NamingEnumeration<?> e = namingContextsAttr.getAll();
+        
         while ( e.hasMore() )
         {
             Object value = e.next();
@@ -377,7 +390,7 @@
         // Retrieve all subtree including the base entry
         SearchControls ctrl = new SearchControls();
         ctrl.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        NamingEnumeration e = ctx.getDirectoryService().getPartitionNexus().search(
+        NamingEnumeration<SearchResult> e = ctx.getDirectoryService().getPartitionNexus().search(
             new SearchOperationContext( contextName, AliasDerefMode.DEREF_ALWAYS,
             new PresenceNode( SchemaConstants.OBJECT_CLASS_AT_OID ), ctrl ) );
 
@@ -385,7 +398,7 @@
         {
             while ( e.hasMore() )
             {
-                SearchResult sr = ( SearchResult ) e.next();
+                SearchResult sr = e.next();
                 Attributes attrs = sr.getAttributes();
 
                 // Skip entries without entryCSN attribute.

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
Wed Dec 26 07:26:43 2007
@@ -26,7 +26,14 @@
 import org.apache.directory.mitosis.service.ReplicationContext;
 import org.apache.directory.mitosis.service.ReplicationContext.State;
 import org.apache.directory.mitosis.service.protocol.Constants;
-import org.apache.directory.mitosis.service.protocol.message.*;
+import org.apache.directory.mitosis.service.protocol.message.BeginLogEntriesAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.BeginLogEntriesMessage;
+import org.apache.directory.mitosis.service.protocol.message.EndLogEntriesAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.EndLogEntriesMessage;
+import org.apache.directory.mitosis.service.protocol.message.LogEntryAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.LogEntryMessage;
+import org.apache.directory.mitosis.service.protocol.message.LoginAckMessage;
+import org.apache.directory.mitosis.service.protocol.message.LoginMessage;
 import org.apache.directory.mitosis.store.ReplicationStore;
 import org.apache.mina.common.IdleStatus;
 import org.apache.mina.util.SessionLog;

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/ReplicationStore.java
Wed Dec 26 07:26:43 2007
@@ -20,7 +20,10 @@
 package org.apache.directory.mitosis.store;
 
 
-import org.apache.directory.mitosis.common.*;
+import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.mitosis.common.CSNVector;
+import org.apache.directory.mitosis.common.ReplicaId;
+import org.apache.directory.mitosis.common.UUID;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.operation.Operation;
 import org.apache.directory.server.core.DirectoryService;

Modified: directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java?rev=606907&r1=606906&r2=606907&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
(original)
+++ directory/apacheds/branches/bigbang/mitosis/src/main/java/org/apache/directory/mitosis/store/derby/DerbyReplicationStore.java
Wed Dec 26 07:26:43 2007
@@ -21,7 +21,11 @@
 
 
 import org.apache.commons.dbcp.BasicDataSource;
-import org.apache.directory.mitosis.common.*;
+import org.apache.directory.mitosis.common.CSN;
+import org.apache.directory.mitosis.common.CSNVector;
+import org.apache.directory.mitosis.common.DefaultCSN;
+import org.apache.directory.mitosis.common.ReplicaId;
+import org.apache.directory.mitosis.common.UUID;
 import org.apache.directory.mitosis.configuration.ReplicationConfiguration;
 import org.apache.directory.mitosis.operation.Operation;
 import org.apache.directory.mitosis.operation.OperationCodec;
@@ -35,7 +39,12 @@
 import javax.naming.Name;
 import javax.naming.ldap.LdapName;
 import java.io.File;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
@@ -511,11 +520,12 @@
             // Check if the specified uuid already exists
             ps = con.prepareStatement( query );
 
-            Iterator i = updateVector.getReplicaIds().iterator();
+            Iterator<ReplicaId> i = updateVector.getReplicaIds().iterator();
             int paramIdx = 1;
+            
             while ( i.hasNext() )
             {
-                ReplicaId replicaId = ( ReplicaId ) i.next();
+                ReplicaId replicaId = i.next();
                 CSN csn = updateVector.getCSN( replicaId );
                 ps.setString( paramIdx++, replicaId.getId() );
                 ps.setLong( paramIdx++, csn.getTimestamp() );



Mime
View raw message