directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1081606 - in /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model: ldif/LdifEntry.java name/Dn.java
Date Mon, 14 Mar 2011 23:17:47 GMT
Author: elecharny
Date: Mon Mar 14 23:17:47 2011
New Revision: 1081606

URL: http://svn.apache.org/viewvc?rev=1081606&view=rev
Log:
o Made the LdifEntry class externalizable
o Using the Entry.readExternal() method

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java?rev=1081606&r1=1081605&r2=1081606&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/ldif/LdifEntry.java
Mon Mar 14 23:17:47 2011
@@ -61,7 +61,7 @@ import org.apache.directory.shared.util.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdifEntry implements Cloneable
+public class LdifEntry implements Cloneable, Externalizable
 {
     /** Used in toArray() */
     public static final Modification[] EMPTY_MODS = new Modification[0];
@@ -989,12 +989,13 @@ public class LdifEntry implements Clonea
         // Read the changeType
         int type = in.readInt();
         changeType = ChangeType.getChangeType( type );
-        entry = ( Entry ) in.readObject();
+        Entry entry = new DefaultEntry();
+        
+        entry.readExternal( in );
 
         switch ( changeType )
         {
             case Add:
-                // Fallback
             case Delete:
                 // we don't have anything to read, but the control
                 break;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java?rev=1081606&r1=1081605&r2=1081606&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Mon Mar 14 23:17:47 2011
@@ -434,12 +434,12 @@ public final class Dn implements Iterabl
         {
             normalized = false;
             
-            if ( this.schemaManager != null )
+            if ( this.schemaManager == null )
             {
-                normalize( schemaManager );
+                this.schemaManager = schemaManager;
             }
 
-            normalizeInternal();
+            normalize( this.schemaManager );
             toUpName();
         }
         catch( LdapInvalidDnException lide )



Mime
View raw message