directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r749072 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
Date Sun, 01 Mar 2009 18:34:47 GMT
Author: elecharny
Date: Sun Mar  1 18:34:47 2009
New Revision: 749072

URL: http://svn.apache.org/viewvc?rev=749072&view=rev
Log:
o Transform some of the ldfi keywords to lowercase (changeType -> changetype).
o Reordered the Moddn elements

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=749072&r1=749071&r2=749072&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
Sun Mar  1 18:34:47 2009
@@ -320,7 +320,8 @@
         sb.append( '\n' );
         
         // Dump the ChangeType
-        sb.append( stripLineToNChars( "changeType: " + entry.getChangeType(), length ) );
+        String changeType = entry.getChangeType().toString().toLowerCase();
+        sb.append( stripLineToNChars( "changetype: " + changeType, length ) );
         
         sb.append( '\n' );
 
@@ -355,6 +356,11 @@
                     throw new NamingException( "Invalid Entry : a modifyDN operation entry
should not contain attributes" );
                 }
                 
+                
+                // Stores the new RDN
+                EntryAttribute newRdn = new DefaultClientAttribute( "newrdn", entry.getNewRdn()
);
+                sb.append( convertToLdif( newRdn, length ) );
+
                 // Stores the deleteoldrdn flag
                 sb.append( "deleteoldrdn: " );
                 
@@ -376,10 +382,6 @@
                     sb.append( convertToLdif( newSuperior, length ) );
                 }
                 
-                // Stores the new RDN
-                EntryAttribute newRdn = new DefaultClientAttribute( "newrdn", entry.getNewRdn()
);
-                sb.append( convertToLdif( newRdn, length ) );
-                
                 break;
                 
             case Modify :



Mime
View raw message