directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1073853 - /directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
Date Wed, 23 Feb 2011 17:56:58 GMT
Author: elecharny
Date: Wed Feb 23 17:56:58 2011
New Revision: 1073853

URL: http://svn.apache.org/viewvc?rev=1073853&view=rev
Log:
Minor code simplification

Modified:
    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/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=1073853&r1=1073852&r2=1073853&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
Wed Feb 23 17:56:58 2011
@@ -1588,23 +1588,13 @@ public final class Dn implements Iterabl
     /** No qualifier */
     static void rdnOidToName( Rdn rdn, Map<String, OidNormalizer> oidsMap ) throws
LdapInvalidDnException
     {
-        if ( rdn.getNbAtavs() > 1 )
-        {
-            // We have more than one ATAV for this Rdn. We will loop on all
-            // ATAVs
-            Rdn rdnCopy = rdn.clone();
-            rdn.clear();
+        // We have more than one ATAV for this Rdn. We will loop on all
+        // ATAVs
+        Rdn rdnCopy = rdn.clone();
+        rdn.clear();
 
-            for ( Ava val : rdnCopy )
-            {
-                Ava newAtav = atavOidToName( val, oidsMap );
-                rdn.addAVA( newAtav );
-            }
-        }
-        else
+        for ( Ava val : rdnCopy )
         {
-            Ava val = rdn.getAVA();
-            rdn.clear();
             Ava newAtav = atavOidToName( val, oidsMap );
             rdn.addAVA( newAtav );
         }



Mime
View raw message