directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1078301 - /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java
Date Sat, 05 Mar 2011 15:26:21 GMT
Author: elecharny
Date: Sat Mar  5 15:26:20 2011
New Revision: 1078301

URL: http://svn.apache.org/viewvc?rev=1078301&view=rev
Log:
o Used the RdnSerializer instead of the readExternal() method

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java?rev=1078301&r1=1078300&r2=1078301&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java
Sat Mar  5 15:26:20 2011
@@ -27,7 +27,9 @@ import java.io.ObjectOutput;
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.name.Rdn;
+import org.apache.directory.shared.ldap.model.name.RdnSerializer;
 
 
 /**
@@ -189,7 +191,7 @@ public class ParentIdAndRdn<ID extends C
 
         for ( Rdn rdn : rdns )
         {
-            rdn.writeExternal( out );
+            RdnSerializer.serialize( rdn, out );
         }
     }
 
@@ -203,9 +205,14 @@ public class ParentIdAndRdn<ID extends C
         
         for ( int i = 0; i < size; i++ )
         {
-            Rdn rdn = new Rdn();
-            rdn.readExternal( in );
-            rdns[i] = rdn;
+            try
+            {
+                rdns[i] = RdnSerializer.deserialize( null, in );
+            }
+            catch ( LdapInvalidDnException lide )
+            {
+                throw new IOException( lide.getMessage() );
+            }
         }
     }
     



Mime
View raw message