directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r470678 - /directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Date Fri, 03 Nov 2006 05:53:07 GMT
Author: elecharny
Date: Thu Nov  2 21:53:06 2006
New Revision: 470678

URL: http://svn.apache.org/viewvc?view=rev&rev=470678
Log:
Added some formatting, and used Java5 features (like generic) 
to clarify the code a little bit.

Modified:
    directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=470678&r1=470677&r2=470678
==============================================================================
--- directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/branches/apacheds-schema/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Thu Nov  2 21:53:06 2006
@@ -20,7 +20,11 @@
 package org.apache.directory.server.core;
 
 
-import java.util.*;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -523,8 +527,11 @@
 
             partitionNexus.add(normName, attributes );
             AuthorizationService authzSrvc = ( AuthorizationService ) interceptorChain.get(
"authorizationService" );
-            if (authzSrvc != null)
+            
+            if (authzSrvc != null) 
+            {
                 authzSrvc.cacheNewGroup( upName, normName, attributes );
+            }
         }
 
         // -------------------------------------------------------------------
@@ -738,18 +745,17 @@
         BootstrapRegistries bootstrapRegistries = new BootstrapRegistries();
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
         loader.load( startupConfiguration.getBootstrapSchemas(), bootstrapRegistries );
-        if (startupConfiguration.getSchemaLoaders() != null)
+        
+        if ( startupConfiguration.getSchemaLoaders() != null )
         {
-            for (Iterator it = startupConfiguration.getSchemaLoaders().iterator(); it.hasNext();)
+            for ( SchemaLoader schemaLoader:startupConfiguration.getSchemaLoaders() )
             {
-                final SchemaLoader     schemaLoader;
-
-                schemaLoader = (SchemaLoader) it.next();
                 schemaLoader.loadSchemas(startupConfiguration, bootstrapRegistries);
             }
         }
 
         java.util.List errors = bootstrapRegistries.checkRefInteg();
+        
         if ( !errors.isEmpty() )
         {
             NamingException e = new NamingException();



Mime
View raw message