directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1082945 - /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java
Date Fri, 18 Mar 2011 15:10:22 GMT
Author: elecharny
Date: Fri Mar 18 15:10:21 2011
New Revision: 1082945

URL: http://svn.apache.org/viewvc?rev=1082945&view=rev
Log:
Used the readExternal/writeExternal methods

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java?rev=1082945&r1=1082944&r2=1082945&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/changelog/ChangeLogEventSerializer.java
Fri Mar 18 15:10:21 2011
@@ -29,7 +29,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.LdapPrincipalSerializer;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.ldif.LdifEntry;
-import org.apache.directory.shared.ldap.model.ldif.LdifEntrySerializer;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -71,7 +70,7 @@ public final class ChangeLogEventSeriali
         out.writeLong( event.getRevision() );
         
         // The forward LDIF
-        LdifEntrySerializer.serialize( event.getForwardLdif(), out );
+        event.getForwardLdif().writeExternal( out );
         
         // The reverse LDIFs number
         int nbReverses = event.getReverseLdifs().size();
@@ -79,7 +78,7 @@ public final class ChangeLogEventSeriali
         
         for ( LdifEntry reverseLdif : event.getReverseLdifs() )
         {
-            LdifEntrySerializer.serialize( reverseLdif, out );
+            reverseLdif.writeExternal( out );
         }
         
         out.flush();
@@ -107,7 +106,16 @@ public final class ChangeLogEventSeriali
         long revision = in.readLong();
         
         // The forward LDIF
-        LdifEntry forwardEntry = LdifEntrySerializer.deserialize( schemaManager, in );
+        LdifEntry forwardEntry = new LdifEntry();
+        
+        try
+        {
+            forwardEntry.readExternal( in );
+        }
+        catch ( ClassNotFoundException cnfe )
+        {
+            throw new IOException( cnfe.getMessage() );
+        }
         
         // The reverse LDIFs number
         int nbReverses = in.readInt();
@@ -116,7 +124,17 @@ public final class ChangeLogEventSeriali
         
         for ( int i = 0; i < nbReverses; i++ )
         {
-            LdifEntry reverseEntry = LdifEntrySerializer.deserialize( schemaManager, in );
+            LdifEntry reverseEntry = new LdifEntry();
+
+            try
+            {
+                reverseEntry.readExternal( in );
+            }
+            catch ( ClassNotFoundException cnfe )
+            {
+                throw new IOException( cnfe.getMessage() );
+            }
+            
             reverses.add( reverseEntry );
         }
         



Mime
View raw message