directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r201516 - in /directory/apacheds/trunk: core/src/main/java/org/apache/ldap/server/ core/src/main/java/org/apache/ldap/server/configuration/ main/src/main/java/org/apache/ldap/server/configuration/
Date Thu, 23 Jun 2005 23:04:05 GMT
Author: akarasulu
Date: Thu Jun 23 16:04:05 2005
New Revision: 201516

URL: http://svn.apache.org/viewcvs?rev=201516&view=rev
Log:
Made the testEntries property use a list instead of a set.  This was becoming 
an issue due to a user's node that was not created first before the users so
order does matter.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java?rev=201516&r1=201515&r2=201516&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/AbstractTestCase.java
Thu Jun 23 16:04:05 2005
@@ -22,9 +22,7 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Set;
+import java.util.*;
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
@@ -84,7 +82,7 @@
     protected MutableStartupConfiguration configuration = new MutableStartupConfiguration();
 
     /** A testEntries of entries as Attributes to add to the DIT for testing */
-    protected Set testEntries = new HashSet();
+    protected List testEntries = new ArrayList();
 
     /** An optional LDIF file path if set and present is read to add more test entries */
     private String ldifPath;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java?rev=201516&r1=201515&r2=201516&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/ConfigurationUtil.java
Thu Jun 23 16:04:05 2005
@@ -100,15 +100,16 @@
     /**
      * Returns the deep clone of the specified {@link Attributes} set.
      */
-    static Set getClonedAttributesSet( Set set )
+    static List getClonedAttributesList( List list )
     {
-        Set newSet = new HashSet();
-        Iterator i = set.iterator();
-        while( i.hasNext() )
+        ArrayList newList = new ArrayList();
+
+        for( int ii = 0; ii < list.size(); ii++ )
         {
-            newSet.add( ( ( Attributes ) i.next() ).clone() );
+            newList.add( ( Attributes ) list.get( ii ) );
         }
-        return newSet;
+
+        return newList;
     }
 
     static void validatePortNumber( int port )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java?rev=201516&r1=201515&r2=201516&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/MutableStartupConfiguration.java
Thu Jun 23 16:04:05 2005
@@ -61,7 +61,7 @@
         super.setInterceptorConfigurations( interceptorConfigurations );
     }
 
-    public void setTestEntries( Set testEntries )
+    public void setTestEntries( List testEntries )
     {
         super.setTestEntries( testEntries );
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java?rev=201516&r1=201515&r2=201516&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
Thu Jun 23 16:04:05 2005
@@ -60,7 +60,7 @@
     
     private Set bootstrapSchemas; // Set<BootstrapSchema>
     private Set contextPartitionConfigurations = new HashSet(); // Set<ContextPartitionConfiguration>
-    private Set testEntries = new HashSet(); // Set<Attributes>
+    private List testEntries = new ArrayList(); // List<Attributes>
     
     protected StartupConfiguration()
     {
@@ -260,19 +260,19 @@
      * Returns test directory entries({@link Attributes}) to be loaded while
      * bootstrapping.
      */
-    public Set getTestEntries()
+    public List getTestEntries()
     {
-        return ConfigurationUtil.getClonedAttributesSet( testEntries );
+        return ConfigurationUtil.getClonedAttributesList( testEntries );
     }
 
     /**
      * Sets test directory entries({@link Attributes}) to be loaded while
      * bootstrapping.
      */
-    protected void setTestEntries( Set testEntries )
+    protected void setTestEntries( List testEntries )
     {
-         testEntries = ConfigurationUtil.getClonedAttributesSet(
-                ConfigurationUtil.getTypeSafeSet( testEntries, Attributes.class ) );
+         testEntries = ConfigurationUtil.getClonedAttributesList(
+                ConfigurationUtil.getTypeSafeList( testEntries, Attributes.class ) );
          
          Iterator i = testEntries.iterator();
          while( i.hasNext() )

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java?rev=201516&r1=201515&r2=201516&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
(original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/configuration/MutableServerStartupConfiguration.java
Thu Jun 23 16:04:05 2005
@@ -65,7 +65,7 @@
         super.setInterceptorConfigurations( arg0 );
     }
 
-    public void setTestEntries( Set arg0 )
+    public void setTestEntries( List arg0 )
     {
         super.setTestEntries( arg0 );
     }



Mime
View raw message