directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1073567 - in /directory: apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/
Date Wed, 23 Feb 2011 00:49:47 GMT
Author: elecharny
Date: Wed Feb 23 00:49:47 2011
New Revision: 1073567

URL: http://svn.apache.org/viewvc?rev=1073567&view=rev
Log:
Moved the SchemaManager parameter in first position in the Rdn constructors, to be consistent
with the Dn and Ava classes

Modified:
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Dn.java
    directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1073567&r1=1073566&r2=1073567&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Wed Feb 23 00:49:47 2011
@@ -292,7 +292,7 @@ public class JdbmRdnIndexTest
     {
         initIndex();
         
-        ParentIdAndRdn<Long> key = new ParentIdAndRdn<Long>( 0L, new Rdn( "cn=key",
schemaManager ) );
+        ParentIdAndRdn<Long> key = new ParentIdAndRdn<Long>( 0L, new Rdn( schemaManager,
"cn=key" ) );
         
         assertNull( idx.forwardLookup( key ) );
 
@@ -302,7 +302,7 @@ public class JdbmRdnIndexTest
         
         // check with the different case in UP name, this ensures that the custom
         // key comparator is used
-        key = new ParentIdAndRdn<Long>( 0L, new Rdn( "cn=KEY", schemaManager ) );
+        key = new ParentIdAndRdn<Long>( 0L, new Rdn( schemaManager, "cn=KEY" ) );
         assertEquals( 0, ( long ) idx.forwardLookup( key ) );
         assertEquals( key, idx.reverseLookup( 0l ) );
     }

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=1073567&r1=1073566&r2=1073567&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 00:49:47 2011
@@ -1340,7 +1340,7 @@ public final class Dn implements Iterabl
         Dn clonedDn = copy();
 
         // We have to parse the nameComponent which is given as an argument
-        Rdn newRdn = new Rdn( comp, schemaManager );
+        Rdn newRdn = new Rdn( schemaManager, comp );
 
         clonedDn.rdns.add( 0, newRdn );
 

Modified: directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1073567&r1=1073566&r2=1073567&view=diff
==============================================================================
--- directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap-model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Wed Feb 23 00:49:47 2011
@@ -206,7 +206,7 @@ public class Rdn implements Cloneable, E
      *
      * @param schemaManager the schema manager
      */
-    public Rdn(SchemaManager schemaManager)
+    public Rdn( SchemaManager schemaManager )
     {
         // Don't waste space... This is not so often we have multiple
         // name-components in a Rdn... So we won't initialize the Map and the
@@ -221,11 +221,11 @@ public class Rdn implements Cloneable, E
     /**
      * A constructor that parse a String representing a Rdn.
      *
-     * @param rdn the String containing the Rdn to parse
      * @param schemaManager the schema manager
+     * @param rdn the String containing the Rdn to parse
      * @throws LdapInvalidDnException if the Rdn is invalid
      */
-    public Rdn(String rdn, SchemaManager schemaManager) throws LdapInvalidDnException
+    public Rdn( SchemaManager schemaManager, String rdn ) throws LdapInvalidDnException
     {
         if ( Strings.isNotEmpty(rdn) )
         {
@@ -263,9 +263,9 @@ public class Rdn implements Cloneable, E
      * @param rdn the String containing the Rdn to parse
      * @throws LdapInvalidDnException if the Rdn is invalid
      */
-    public Rdn(String rdn) throws LdapInvalidDnException
+    public Rdn( String rdn ) throws LdapInvalidDnException
     {
-        this( rdn, ( SchemaManager ) null );
+        this( ( SchemaManager ) null, rdn );
     }
 
 
@@ -282,7 +282,7 @@ public class Rdn implements Cloneable, E
      * @param schemaManager the schema manager
      * @throws LdapInvalidDnException if the Rdn is invalid
      */
-    public Rdn(String upType, String normType, String upValue, String normValue, SchemaManager
schemaManager) throws LdapInvalidDnException
+    public Rdn( SchemaManager schemaManager, String upType, String normType, String upValue,
String normValue ) throws LdapInvalidDnException
     {
         this.schemaManager = schemaManager;
 
@@ -315,9 +315,9 @@ public class Rdn implements Cloneable, E
      * @throws LdapInvalidDnException if the Rdn is invalid
      * @see #Rdn(String, String, String, String, SchemaManager)
      */
-    public Rdn(String upType, String normType, String upValue, String normValue) throws LdapInvalidDnException
+    public Rdn( String upType, String normType, String upValue, String normValue ) throws
LdapInvalidDnException
     {
-        this( upType, normType, upValue, normValue, null );
+        this( null, upType, normType, upValue, normValue );
     }
 
 
@@ -332,7 +332,7 @@ public class Rdn implements Cloneable, E
      * @param schemaManager the schema manager
      * @throws LdapInvalidDnException if the Rdn is invalid
      */
-    public Rdn(String upType, String upValue, SchemaManager schemaManager) throws LdapInvalidDnException
+    public Rdn( SchemaManager schemaManager, String upType, String upValue ) throws LdapInvalidDnException
     {
         addAVA( upType, upType, new StringValue( upValue ), new StringValue( upValue ) );
 
@@ -363,9 +363,9 @@ public class Rdn implements Cloneable, E
      * @throws LdapInvalidDnException if the Rdn is invalid
      * @see #Rdn(String, String, SchemaManager)
      */
-    public Rdn(String upType, String upValue) throws LdapInvalidDnException
+    public Rdn( String upType, String upValue ) throws LdapInvalidDnException
     {
-        this( upType, upValue, null );
+        this( null, upType, upValue );
     }
 
 



Mime
View raw message