directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r375336 - in /directory/sandbox/akarasulu/rc1refactor/apacheds: core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
Date Mon, 06 Feb 2006 19:10:49 GMT
Author: akarasulu
Date: Mon Feb  6 11:10:47 2006
New Revision: 375336

URL: http://svn.apache.org/viewcvs?rev=375336&view=rev
Log:
ignoring some exceptions for test entries created twice and quieting down referral tests that
had System.out lines

Modified:
    directory/sandbox/akarasulu/rc1refactor/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java
    directory/sandbox/akarasulu/rc1refactor/apacheds/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java

Modified: directory/sandbox/akarasulu/rc1refactor/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1refactor/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java?rev=375336&r1=375335&r2=375336&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1refactor/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java
(original)
+++ directory/sandbox/akarasulu/rc1refactor/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ReferralTest.java
Mon Feb  6 11:10:47 2006
@@ -898,7 +898,6 @@
         while ( list.hasMore() )
         {
             SearchResult result = ( SearchResult) list.next();
-            System.out.println( "name = " + result.getName() + " results .. " + result );
             results.put ( result.getName(), result );
         }
         
@@ -917,7 +916,6 @@
             while ( list.hasMore() )
             {
                 SearchResult result = ( SearchResult ) list.next();
-                System.out.println( "name = " + result.getName() + " results .. " + result
);
                 results.put ( result.getName(), result );
             }
         }
@@ -944,7 +942,6 @@
             while ( list.hasMore() )
             {
                 SearchResult result = ( SearchResult ) list.next();
-                System.out.println( "name = " + result.getName() + " results .. " + result
);
                 results.put ( result.getName(), result );
             }
         }

Modified: directory/sandbox/akarasulu/rc1refactor/apacheds/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1refactor/apacheds/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java?rev=375336&r1=375335&r2=375336&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1refactor/apacheds/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
(original)
+++ directory/sandbox/akarasulu/rc1refactor/apacheds/core/src/main/java/org/apache/ldap/server/DefaultDirectoryService.java
Mon Feb  6 11:10:47 2006
@@ -37,9 +37,7 @@
 import org.apache.ldap.common.message.LockableAttributesImpl;
 import org.apache.ldap.common.message.ResultCodeEnum;
 import org.apache.ldap.common.name.DnOidContainer;
-import org.apache.ldap.common.name.DnParser;
 import org.apache.ldap.common.name.LdapName;
-import org.apache.ldap.common.name.NameComponentNormalizer;
 import org.apache.ldap.common.util.DateUtils;
 import org.apache.ldap.common.util.StringTools;
 import org.apache.ldap.common.schema.AttributeType;
@@ -52,15 +50,14 @@
 import org.apache.ldap.server.interceptor.InterceptorChain;
 import org.apache.ldap.server.jndi.AbstractContextFactory;
 import org.apache.ldap.server.jndi.DeadContext;
-import org.apache.ldap.server.jndi.LdapJndiProperties;
 import org.apache.ldap.server.jndi.ServerLdapContext;
 import org.apache.ldap.server.partition.DefaultDirectoryPartitionNexus;
 import org.apache.ldap.server.partition.DirectoryPartitionNexus;
 import org.apache.ldap.server.schema.AttributeTypeRegistry;
-import org.apache.ldap.server.schema.ConcreteNameComponentNormalizer;
 import org.apache.ldap.server.schema.GlobalRegistries;
 import org.apache.ldap.server.schema.bootstrap.BootstrapRegistries;
 import org.apache.ldap.server.schema.bootstrap.BootstrapSchemaLoader;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -650,7 +647,6 @@
         String principal = AbstractContextFactory.getPrincipal( env );
         byte[] credential = AbstractContextFactory.getCredential( env );
         String authentication = AbstractContextFactory.getAuthentication( env );
-        String providerUrl = AbstractContextFactory.getProviderUrl( env );
         ServerLdapContext ctx = ( ServerLdapContext ) getJndiContext( principal, credential,

             authentication, "" );
         
@@ -659,7 +655,15 @@
         {
             Attributes entry = ( Attributes ) ( ( Attributes ) i.next() ).clone();
             String dn = ( String ) entry.remove( "dn" ).get();
-            ctx.createSubcontext( dn, entry );
+            
+            try
+            {
+                ctx.createSubcontext( dn, entry );
+            }
+            catch ( Exception e )
+            {
+                log.warn( dn + " test entry already exists.", e );
+            }
         }
     }
 



Mime
View raw message