directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r982337 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/ apacheds/trunk/core-integ/src/test/java/org/apache/directory/se...
Date Wed, 04 Aug 2010 17:24:10 GMT
Author: elecharny
Date: Wed Aug  4 17:24:09 2010
New Revision: 982337

URL: http://svn.apache.org/viewvc?rev=982337&view=rev
Log:
o Removed useless imports and some other minor refactoring

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
    directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
    directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/EntryToResponseCursor.java Wed Aug  4 17:24:09 2010
@@ -27,7 +27,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.message.SearchResultDone;
 import org.apache.directory.ldap.client.api.message.SearchResultEntry;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
-import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.cursor.Cursor;
@@ -35,8 +34,8 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- * A cursor to get SearchResponses after setting the underlying cursor's 
- * ServerEntry object in SearchResultEnty object 
+ * A cursor to get SearchResponses after setting the underlying cursor's
+ * ServerEntry object in SearchResultEnty object
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -47,9 +46,9 @@ public class EntryToResponseCursor<Searc
 
     /** a reference to hold the SearchResultDone response */
     private SearchResultDone searchDoneResp;
-    
+
     private boolean done;
-    
+
     public EntryToResponseCursor( Cursor wrapped )
     {
         this.wrapped = wrapped;
@@ -119,11 +118,11 @@ public class EntryToResponseCursor<Searc
         return ( SearchResponse ) se;
     }
 
-    
+
     /**
      * gives the SearchResultDone message received at the end of search results
-     * 
-     * @return the SearchResultDone message, null if the search operation fails for any reason 
+     *
+     * @return the SearchResultDone message, null if the search operation fails for any reason
      */
     public SearchResultDone getSearchDone()
     {
@@ -159,7 +158,7 @@ public class EntryToResponseCursor<Searc
             ldapResult.setResultCode( ResultCodeEnum.SUCCESS );
             searchDoneResp.setLdapResult( ldapResult );
         }
-        
+
         return done;
     }
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapCoreSessionConnection.java Wed Aug  4 17:24:09 2010
@@ -22,7 +22,6 @@ package org.apache.directory.server.core
 
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -125,12 +124,12 @@ public class LdapCoreSessionConnection i
     {
         this.session = session;
         setDirectoryService( session.getDirectoryService() );
-        
+
         // treat the session was already bound, hence increment the message ID
         messageId.incrementAndGet();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -180,7 +179,7 @@ public class LdapCoreSessionConnection i
     public AddResponse add( AddRequest addRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         InternalAddRequest iadd = new AddRequestImpl( newId );
         iadd.setEntry( addRequest.getEntry() );
 
@@ -195,7 +194,7 @@ public class LdapCoreSessionConnection i
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
@@ -220,11 +219,11 @@ public class LdapCoreSessionConnection i
     public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         CompareResponse resp = new CompareResponse();
         resp.setLdapResult( getDefaultCompareResult() );
         resp.setMessageId( newId );
-        
+
         InternalCompareRequest icompare = new CompareRequestImpl( newId );
 
         try
@@ -247,7 +246,7 @@ public class LdapCoreSessionConnection i
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
@@ -266,7 +265,7 @@ public class LdapCoreSessionConnection i
         compareRequest.setEntryDn( dn );
         compareRequest.setAttrName( attributeName );
         compareRequest.setValue( value );
-        
+
         return compare( compareRequest );
     }
 
@@ -280,7 +279,7 @@ public class LdapCoreSessionConnection i
         compareRequest.setEntryDn( dn );
         compareRequest.setAttrName( attributeName );
         compareRequest.setValue( value );
-        
+
         return compare( compareRequest );
     }
 
@@ -312,7 +311,7 @@ public class LdapCoreSessionConnection i
         compareRequest.setEntryDn( dn );
         compareRequest.setAttrName( attributeName );
         compareRequest.setValue( value.get() );
-        
+
         return compare( compareRequest );
     }
 
@@ -332,11 +331,11 @@ public class LdapCoreSessionConnection i
     public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         DeleteResponse resp = new DeleteResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
-        
+
         InternalDeleteRequest idelete = new DeleteRequestImpl( newId );
 
         try
@@ -347,7 +346,7 @@ public class LdapCoreSessionConnection i
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
@@ -447,15 +446,15 @@ public class LdapCoreSessionConnection i
         return _lookup( dn, attributes );
     }
 
-    
+
     /*
      * this method exists solely for the purpose of calling from
-     * lookup(DN dn) avoiding the varargs, 
+     * lookup(DN dn) avoiding the varargs,
      */
     private SearchResponse _lookup( DN dn, String... attributes )
     {
         int newId = messageId.incrementAndGet();
-        
+
         SearchResultEntry resp = null;
 
         try
@@ -469,7 +468,7 @@ public class LdapCoreSessionConnection i
             {
                 entry = session.lookup( dn, attributes );
             }
-            
+
             resp = new SearchResultEntry();
             resp.setEntry( entry );
             resp.setMessageId( newId );
@@ -482,7 +481,7 @@ public class LdapCoreSessionConnection i
         return resp;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -516,13 +515,13 @@ public class LdapCoreSessionConnection i
     public ModifyResponse modify( DN dn, Modification... modifications ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         ModifyResponse resp = new ModifyResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
-        
+
         InternalModifyRequest iModReq = new ModifyRequestImpl( newId );
-        
+
         try
         {
             iModReq.setName( dn );
@@ -531,13 +530,13 @@ public class LdapCoreSessionConnection i
             {
                 iModReq.addModification( modification );
             }
-            
+
             session.modify( iModReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
@@ -565,29 +564,29 @@ public class LdapCoreSessionConnection i
         ModifyResponse resp = new ModifyResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
-        
+
         InternalModifyRequest iModReq = new ModifyRequestImpl( newId );
-        
+
         try
         {
             iModReq.setName( entry.getDn() );
-            
+
             Iterator<EntryAttribute> itr = entry.iterator();
             while ( itr.hasNext() )
             {
                 iModReq.addModification( new DefaultModification( modOp, itr.next() ) );
             }
-            
+
             session.modify( iModReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
-        
+
         addResponseControls( iModReq, resp );
         return resp;
     }
@@ -599,7 +598,7 @@ public class LdapCoreSessionConnection i
     public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         ModifyResponse resp = new ModifyResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
@@ -621,7 +620,7 @@ public class LdapCoreSessionConnection i
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
@@ -635,12 +634,12 @@ public class LdapCoreSessionConnection i
      * {@inheritDoc}
      * WARNING: this method is not in compatible with CoreSession API in some cases
      *          cause this we call {@link CoreSession#move(InternalModifyDnRequest)} always from this method.
-     *          Instead use other specific modifyDn operations like {@link #move(DN, DN)}, {@link #rename(DN, RDN)} etc.. 
+     *          Instead use other specific modifyDn operations like {@link #move(DN, DN)}, {@link #rename(DN, RDN)} etc..
      */
     public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         ModifyDnResponse resp = new ModifyDnResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
@@ -653,17 +652,17 @@ public class LdapCoreSessionConnection i
             iModDnReq.setName( modDnRequest.getEntryDn() );
             iModDnReq.setNewRdn( modDnRequest.getNewRdn() );
             iModDnReq.setNewSuperior( modDnRequest.getNewSuperior() );
-            
+
             session.move( iModDnReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
-        
+
         addResponseControls( iModDnReq, resp );
         return resp;
     }
@@ -685,17 +684,17 @@ public class LdapCoreSessionConnection i
         {
             iModDnReq.setName( entryDn );
             iModDnReq.setNewSuperior( newSuperiorDn );
-            
+
             session.move( iModDnReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
-        
+
         addResponseControls( iModDnReq, resp );
         return resp;
     }
@@ -716,7 +715,7 @@ public class LdapCoreSessionConnection i
     public ModifyDnResponse rename( DN entryDn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         int newId = messageId.incrementAndGet();
-        
+
         ModifyDnResponse resp = new ModifyDnResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
@@ -728,17 +727,17 @@ public class LdapCoreSessionConnection i
             iModDnReq.setName( entryDn );
             iModDnReq.setNewRdn( newRdn );
             iModDnReq.setDeleteOldRdn( deleteOldRdn );
-            
+
             session.rename( iModDnReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
-        
+
         addResponseControls( iModDnReq, resp );
         return resp;
     }
@@ -824,7 +823,7 @@ public class LdapCoreSessionConnection i
         }
 
         int newId = messageId.incrementAndGet();
-        
+
         ModifyDnResponse resp = new ModifyDnResponse();
         resp.setLdapResult( getDefaultResult() );
         resp.setMessageId( newId );
@@ -836,17 +835,17 @@ public class LdapCoreSessionConnection i
             iModDnReq.setName( entryDn );
             iModDnReq.setNewSuperior( newDn );
             iModDnReq.setDeleteOldRdn( deleteOldRdn );
-            
+
             session.moveAndRename( iModDnReq );
         }
         catch ( LdapException e )
         {
             LOG.warn( e.getMessage(), e );
-            
+
             resp.getLdapResult().setResultCode( ResultCodeEnum.getResultCode( e ) );
             resp.getLdapResult().setErrorMessage( e.getMessage() );
         }
-        
+
         addResponseControls( iModDnReq, resp );
         return resp;
     }
@@ -873,7 +872,7 @@ public class LdapCoreSessionConnection i
         try
         {
             int newId = messageId.incrementAndGet();
-            
+
             InternalSearchRequest iSearchReq = new SearchRequestImpl( newId );
             iSearchReq.setBase( new DN( searchRequest.getBaseDn() ) );
             iSearchReq.setDerefAliases( searchRequest.getDerefAliases() );
@@ -901,7 +900,7 @@ public class LdapCoreSessionConnection i
         {
             LOG.warn( e.getMessage(), e );
         }
-        
+
         return new EntryToResponseCursor<SearchResponse>( new EmptyCursor<SearchResponse>() );
     }
 
@@ -1031,7 +1030,7 @@ public class LdapCoreSessionConnection i
         BindRequest bindReq = new BindRequest();
         bindReq.setName( "" );
         bindReq.setCredentials( ( byte[] ) null );
-        
+
         return bind( bindReq );
     }
 
@@ -1083,11 +1082,11 @@ public class LdapCoreSessionConnection i
     public BindResponse bind( DN name, String credentials ) throws LdapException, IOException
     {
         byte[] credBytes = ( credentials == null ? StringTools.EMPTY_BYTES : StringTools.getBytesUtf8( credentials ) );
-        
+
         BindRequest bindReq = new BindRequest();
         bindReq.setName( name.getName() );
         bindReq.setCredentials( credBytes );
-        
+
         return bind( bindReq );
     }
 
@@ -1099,12 +1098,12 @@ public class LdapCoreSessionConnection i
     {
         return bind( new DN( name ), credentials );
     }
-    
-    
+
+
     private void addResponseControls( InternalResultResponseRequest iReq, AbstractMessage clientResp )
     {
         Collection<Control> ctrlSet = iReq.getResultResponse().getControls().values();
-        
+
         for( Control c : ctrlSet )
         {
             clientResp.add( c );
@@ -1123,6 +1122,6 @@ public class LdapCoreSessionConnection i
         this.directoryService = directoryService;
         this.schemaManager = directoryService.getSchemaManager();
     }
-    
-    
+
+
 }

Modified: directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/apacheds/trunk/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Wed Aug  4 17:24:09 2010
@@ -36,7 +36,6 @@ import org.apache.commons.io.FileUtils;
 import org.apache.directory.ldap.client.api.LdapConnection;
 import org.apache.directory.ldap.client.api.LdapConnectionFactory;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.apache.directory.ldap.client.api.message.BindResponse;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
@@ -57,7 +56,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -104,7 +102,7 @@ public class IntegrationUtils
      * Inject an ldif String into the server. DN must be relative to the
      * root.
      *
-     * @param service the directory service to use 
+     * @param service the directory service to use
      * @param ldif the ldif containing entries to add to the server.
      * @throws NamingException if there is a problem adding the entries from the LDIF
      */
@@ -117,12 +115,12 @@ public class IntegrationUtils
         {
             if ( entry.isChangeAdd() )
             {
-                service.getAdminSession().add( 
+                service.getAdminSession().add(
                     new DefaultEntry( service.getSchemaManager(), entry.getEntry() ) );
             }
             else if ( entry.isChangeModify() )
             {
-                service.getAdminSession().modify( 
+                service.getAdminSession().modify(
                     entry.getDn(), entry.getModificationItems() );
             }
             else
@@ -132,7 +130,7 @@ public class IntegrationUtils
                 throw new NamingException( message );
             }
         }
-        
+
         // And close the reader
         reader.close();
     }
@@ -173,15 +171,15 @@ public class IntegrationUtils
         {
             principalDn = "";
         }
-        
+
         DN userDn = new DN( principalDn, service.getSchemaManager() );
         LdapPrincipal principal = new LdapPrincipal( userDn, AuthenticationLevel.SIMPLE );
-        
+
         if ( dn == null )
         {
             dn = "";
         }
-        
+
         CoreSession session = service.getSession( principal );
         return session;
     }
@@ -213,25 +211,25 @@ public class IntegrationUtils
         switch( entry.getChangeType().getChangeType() )
         {
             case( ChangeType.ADD_ORDINAL ):
-                session.add( 
-                    new DefaultEntry( service.getSchemaManager(), entry.getEntry() ) ); 
+                session.add(
+                    new DefaultEntry( service.getSchemaManager(), entry.getEntry() ) );
                 break;
-                
+
             case( ChangeType.DELETE_ORDINAL ):
                 session.delete( dn );
                 break;
-                
+
             case( ChangeType.MODDN_ORDINAL ):
             case( ChangeType.MODRDN_ORDINAL ):
                 RDN newRdn = new RDN( entry.getNewRdn() );
-            
+
                 if ( entry.getNewSuperior() != null )
                 {
                     // It's a move. The superior have changed
                     // Let's see if it's a rename too
                     RDN oldRdn = dn.getRdn();
                     DN newSuperior = new DN( entry.getNewSuperior() );
-                    
+
                     if ( dn.size() == 0 )
                     {
                         throw new IllegalStateException( I18n.err( I18n.ERR_475 ) );
@@ -243,7 +241,7 @@ public class IntegrationUtils
                     }
                     else
                     {
-                        // it's a move and rename 
+                        // it's a move and rename
                         session.moveAndRename( dn, newSuperior, newRdn, entry.isDeleteOldRdn() );
                     }
                 }
@@ -252,7 +250,7 @@ public class IntegrationUtils
                     // it's a rename
                     session.rename( dn, newRdn, entry.isDeleteOldRdn() );
                 }
-                
+
                 break;
 
             case( ChangeType.MODIFY_ORDINAL ):
@@ -273,7 +271,7 @@ public class IntegrationUtils
         ldif.setDn( dnstr );
         ldif.setChangeType( ChangeType.Add );
 
-        EntryAttribute attr = new DefaultEntryAttribute( "objectClass", 
+        EntryAttribute attr = new DefaultEntryAttribute( "objectClass",
             "top", "person", "organizationalPerson", "inetOrgPerson" );
         ldif.addAttribute( attr );
 
@@ -312,8 +310,8 @@ public class IntegrationUtils
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
     }
-    
-    
+
+
     public static void disableSchema( DirectoryService service, String schemaName ) throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
@@ -324,30 +322,30 @@ public class IntegrationUtils
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         schemaRoot.modifyAttributes( "cn=" + schemaName, mods );
     }
-    
-    
+
+
     /**
      * A helper method which tells if a schema is disabled.
      */
     public static boolean isDisabled( DirectoryService service, String schemaName )
     {
         Schema schema = service.getSchemaManager().getLoadedSchema( schemaName );
-        
+
         return ( schema == null ) || schema.isDisabled();
     }
-    
-    
+
+
     /**
      * A helper method which tells if a schema is loaded.
      */
     public static boolean isLoaded( DirectoryService service, String schemaName )
     {
         Schema schema = service.getSchemaManager().getLoadedSchema( schemaName );
-        
+
         return ( schema != null );
     }
-    
-    
+
+
     /**
      * A helper method which tells if a schema is enabled. A shema must be
      * loaded and enabled.
@@ -355,11 +353,11 @@ public class IntegrationUtils
     public static boolean isEnabled( DirectoryService service, String schemaName )
     {
         Schema schema = service.getSchemaManager().getLoadedSchema( schemaName );
-        
+
         return ( schema != null ) && schema.isEnabled();
     }
-    
-    
+
+
     /**
      * gets a LdapConnection bound using the default admin DN uid=admin,ou=system and password "secret"
      */
@@ -378,10 +376,10 @@ public class IntegrationUtils
     public static LdapConnection getConnectionAs( DirectoryService dirService, DN dn, String password ) throws Exception
     {
         Object connectionObj = LdapConnectionFactory.getCoreSessionConnection();
-        
+
         LdapCoreSessionConnection coreConnection = ( LdapCoreSessionConnection ) connectionObj;
         coreConnection.setDirectoryService( dirService );
-        
+
         coreConnection.bind( dn, password );
 
         return coreConnection;
@@ -390,14 +388,14 @@ public class IntegrationUtils
 
     public static LdapConnection getNetworkConnectionAs( String host, int port, String dn, String password ) throws Exception
     {
-        LdapConnection connection = ( LdapConnection) LdapConnectionFactory.getNetworkConnection( host, port );
-        
+        LdapConnection connection = LdapConnectionFactory.getNetworkConnection( host, port );
+
         connection.bind( dn, password );
         openConnections.add( connection );
         return connection;
     }
 
-    
+
     public static LdapConnection getAdminNetworkConnection( LdapServer ldapServer ) throws Exception
     {
         LdapConnection connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
@@ -410,23 +408,23 @@ public class IntegrationUtils
         return connection;
     }
 
-    
+
     public static LdapConnection getNetworkConnectionAs( LdapServer ldapServer, String userDn, String password ) throws Exception
     {
         return getNetworkConnectionAs( "localhost", ldapServer.getPort(), userDn, password );
     }
 
-    
+
     public static void closeConnections()
     {
-        
+
         for( LdapConnection con : openConnections )
         {
             if( con == null )
             {
                 continue;
             }
-            
+
             try
             {
                 if( con.isConnected() )
@@ -440,7 +438,7 @@ public class IntegrationUtils
                 e.printStackTrace();
             }
         }
-        
+
         openConnections.clear();
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java Wed Aug  4 17:24:09 2010
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.server.core.authn;
 
@@ -23,9 +23,9 @@ package org.apache.directory.server.core
 import static org.apache.directory.server.core.integ.IntegrationUtils.apply;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getConnectionAs;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.directory.ldap.client.api.LdapConnection;
@@ -38,7 +38,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -78,8 +77,8 @@ public class SimpleAuthenticationIT exte
     {
         IntegrationUtils.closeConnections();
     }
-    
-    
+
+
     /**
      * Check the creation of the admin account and persistence across restarts.
      *

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/bind/SimpleBindIT.java Wed Aug  4 17:24:09 2010
@@ -48,7 +48,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.integ.IntegrationUtils;
 import org.apache.directory.server.core.jndi.CoreContextFactory;
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
-import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
@@ -85,7 +84,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * try to connect using a known user/password and read an entry.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -128,7 +127,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * try to connect using a known user but with a bad password: we should get a invalidCredentials error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -167,7 +166,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * try to connect using a user with an invalid DN: we should get a invalidDNSyntax error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -206,7 +205,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * try to connect using a unknown user: we should get a invalidCredentials error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -247,7 +246,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * covers the anonymous authentication : we should be able to read the rootDSE, but that's it
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -279,7 +278,7 @@ public class SimpleBindIT extends Abstra
             fail();
         }
 
-        // We should be anonymous here. 
+        // We should be anonymous here.
         // Check that we can read the rootDSE
         try
         {
@@ -325,7 +324,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * covers the Unauthenticated case : we should get a UnwillingToPerform error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -363,7 +362,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * covers the Unauthenticated case : we should get a UnwillingToPerform error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -381,7 +380,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * not allowed by the server. We should get a invalidCredentials error.
-     * 
+     *
      * @throws Exception on error
      */
     @Test
@@ -419,7 +418,7 @@ public class SimpleBindIT extends Abstra
 
     /**
      * try to connect using a known user/password and read an entry.
-     * 
+     *
      * @throws Exception on error
      */
     @Test

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java Wed Aug  4 17:24:09 2010
@@ -47,7 +47,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -477,7 +476,6 @@ public class SchemaCheckerTest
     @Test
     public void testPreventRdnChangeOnModifyRemoveAttribute() throws Exception
     {
-        Map<String, OidNormalizer> oidNormalizers = schemaManager.getAttributeTypeRegistry().getNormalizerMapping();
         ModificationOperation mod = ModificationOperation.REMOVE_ATTRIBUTE;
         DN name = DNFactory.create( "ou=user,dc=example,dc=com", schemaManager );
         AttributeType cnAt = schemaManager.lookupAttributeTypeRegistry( "cn" );

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Wed Aug  4 17:24:09 2010
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.server.core.schema;
 
@@ -29,7 +29,6 @@ import java.io.File;
 
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -44,8 +43,8 @@ import org.junit.Test;
 
 /**
  * Tests the partition schema loader.
- * 
- * TODO move this to core-integ does not belong here and get rid of all the static 
+ *
+ * TODO move this to core-integ does not belong here and get rid of all the static
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -60,14 +59,14 @@ public class PartitionSchemaLoaderTest
         // setup working directory
         directoryService = new DefaultDirectoryService();
         File workingDirectory = new File( System.getProperty( "workingDirectory", System.getProperty( "user.dir" ) ) );
-        
+
         if ( ! workingDirectory.exists() )
         {
             workingDirectory.mkdirs();
         }
-        
+
         directoryService.setWorkingDirectory( workingDirectory );
-        
+
         // --------------------------------------------------------------------
         // Load the bootstrap schemas to start up the schema partition
         // --------------------------------------------------------------------
@@ -91,12 +90,12 @@ public class PartitionSchemaLoaderTest
         {
             fail( "Schema load failed : " + LdapExceptionUtils.printErrors( schemaManager.getErrors() ) );
         }
-        
+
         directoryService.setSchemaManager( schemaManager );
     }
-    
-    
-    @Test 
+
+
+    @Test
     public void testGetSchemas() throws Exception
     {
         SchemaLoader loader = directoryService.getSchemaManager().getLoader();
@@ -106,26 +105,26 @@ public class PartitionSchemaLoaderTest
         assertEquals( schema.getSchemaName(), "mozilla" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "core" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "core" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "apachedns" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apachedns" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "autofs" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "autofs" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "apache" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apache" );
@@ -139,65 +138,65 @@ public class PartitionSchemaLoaderTest
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "krb5kdc" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "krb5kdc" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "samba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "samba" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "collective" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "collective" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "java" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "java" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "dhcp" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "dhcp" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "corba" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "corba" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "nis" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "nis" );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "inetorgperson" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "inetorgperson" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "system" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "system" );
         assertFalse( schema.isDisabled() );
         assertEquals( schema.getOwner(), "uid=admin,ou=system" );
         schema = null;
-        
+
         schema = loader.getSchema( "apachemeta" );
         assertNotNull( schema );
         assertEquals( schema.getSchemaName(), "apachemeta" );

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java Wed Aug  4 17:24:09 2010
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.client.api;
 
@@ -48,9 +48,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -60,28 +58,28 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith ( FrameworkRunner.class )
-@CreateLdapServer ( 
-    transports = 
+@CreateLdapServer (
+    transports =
     {
-        @CreateTransport( protocol = "LDAP" ), 
-        @CreateTransport( protocol = "LDAPS" ) 
+        @CreateTransport( protocol = "LDAP" ),
+        @CreateTransport( protocol = "LDAPS" )
     })
 public class LdapConnectionTest extends AbstractLdapTestUnit
 {
-    
+
     private static final String ADMIN_DN = "uid=admin,ou=system";
 
     private static LdapConnection connection;
-    
-    
+
+
     @Before
     public void bindConnection() throws Exception
     {
         connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
         connection.bind( ADMIN_DN, "secret" );
     }
-    
-    
+
+
     @After
     public void unbindConnection() throws Exception
     {
@@ -90,8 +88,8 @@ public class LdapConnectionTest extends 
             connection.close();
         }
     }
-    
-    
+
+
     /**
      * Test a successful bind request
      *
@@ -104,9 +102,9 @@ public class LdapConnectionTest extends 
         try
         {
             BindResponse bindResponse = connection.bind( ADMIN_DN, "secret" );
-            
+
             assertNotNull( bindResponse );
-            
+
             //connection.unBind();
         }
         catch ( LdapException le )
@@ -129,8 +127,8 @@ public class LdapConnectionTest extends 
             }
         }
     }
-    
-    
+
+
     @Test
     public void testGetSupportedControls() throws Exception
     {
@@ -138,14 +136,14 @@ public class LdapConnectionTest extends 
         assertNotNull( controlList );
         assertFalse( controlList.isEmpty() );
     }
-    
-    
+
+
     @Test
     public void testLookup() throws Exception
     {
         SearchResponse resp = connection.lookup( ADMIN_DN );
         assertNotNull( resp );
-        
+
         Entry entry = ( ( SearchResultEntry ) resp ).getEntry();
         assertNull( entry.get( SchemaConstants.ENTRY_UUID_AT ) );
 
@@ -154,28 +152,28 @@ public class LdapConnectionTest extends 
         entry = ( ( SearchResultEntry ) resp ).getEntry();
         assertNotNull( entry.get( SchemaConstants.ENTRY_UUID_AT ) );
     }
-    
+
 
     @Test
     public void searchByEntryUuid() throws Exception
     {
         SearchResponse resp = connection.lookup( ADMIN_DN, "+" );
         Entry entry = ( ( SearchResultEntry ) resp ).getEntry();
-        
+
         String uuid = entry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
-        
+
         EqualityNode<String> filter = new EqualityNode<String>( SchemaConstants.ENTRY_UUID_AT, new StringValue( uuid ) );
-        
+
         Cursor<SearchResponse> cursor = connection.search( ADMIN_DN, filter.toString(), SearchScope.SUBTREE, "+" );
         cursor.next();
 
         Entry readEntry = ( ( SearchResultEntry ) cursor.get() ).getEntry();
         assertEquals( uuid, readEntry.get( SchemaConstants.ENTRY_UUID_AT ).getString() );
-        
+
         cursor.close();
     }
 
-    
+
     @Test
     public void testRetrieveBinaryAttibute() throws Exception
     {
@@ -183,12 +181,12 @@ public class LdapConnectionTest extends 
         assertFalse( entry.get( SchemaConstants.USER_PASSWORD_AT ).get().isBinary() );
 
         connection.loadSchema();
-        
+
         entry = ( ( SearchResultEntry ) connection.lookup( "uid=admin,ou=system" ) ).getEntry();
         assertTrue( entry.get( SchemaConstants.USER_PASSWORD_AT ).get().isBinary() );
     }
 
-    
+
     @Test
     public void testLoadSchema() throws Exception
     {
@@ -200,17 +198,17 @@ public class LdapConnectionTest extends 
         assertEquals( manager.getLoader().getAllSchemas().size(), manager.getEnabled().size() );
     }
 
-    
+
     /**
      * this test is intended to test the behavior of CursorList when the RootDSE searchrequest was sent over
-     *  wire 
+     *  wire
      */
     @Test
     public void testSearchEmptyDNWithOneLevelScopeAndNoObjectClassPresenceFilter() throws Exception
     {
         Cursor<SearchResponse> cursor = connection.search( "", "(objectClass=*)", SearchScope.ONELEVEL, "*", "+" );
         HashMap<String, Entry> map = new HashMap<String, Entry>();
-        
+
         while ( cursor.next() )
         {
             Entry result = ( ( SearchResultEntry ) cursor.get() ).getEntry();
@@ -218,7 +216,7 @@ public class LdapConnectionTest extends 
         }
 
         assertEquals( 2, map.size() );
-        
+
         assertTrue( map.containsKey( "ou=system" ) );
         assertTrue( map.containsKey( "ou=schema" ) );
     }

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapSSLConnectionTest.java Wed Aug  4 17:24:09 2010
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.client.api;
 
@@ -49,7 +49,6 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Before;
-import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -58,15 +57,15 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class ) 
-@CreateLdapServer ( 
-    transports = 
+@RunWith ( FrameworkRunner.class )
+@CreateLdapServer (
+    transports =
     {
         @CreateTransport( protocol = "LDAP" ),
         @CreateTransport( protocol = "LDAPS" )
     },
     saslHost="localhost",
-    saslMechanisms = 
+    saslMechanisms =
     {
         @SaslMechanism( name=SupportedSaslMechanisms.PLAIN, implClass=PlainMechanismHandler.class ),
         @SaslMechanism( name=SupportedSaslMechanisms.CRAM_MD5, implClass=CramMd5MechanismHandler.class),
@@ -75,15 +74,15 @@ import org.junit.runner.RunWith;
         @SaslMechanism( name=SupportedSaslMechanisms.NTLM, implClass=NtlmMechanismHandler.class),
         @SaslMechanism( name=SupportedSaslMechanisms.GSS_SPNEGO, implClass=NtlmMechanismHandler.class)
     },
-    extendedOpHandlers = 
+    extendedOpHandlers =
     {
         StoredProcedureExtendedOperationHandler.class
     })
 public class LdapSSLConnectionTest extends AbstractLdapTestUnit
 {
     private static LdapConnectionConfig config;
-    
-    
+
+
     @Before
     public void setup()
     {
@@ -109,8 +108,8 @@ public class LdapSSLConnectionTest exten
         config.setLdapPort( ldapServer.getPortSSL() );
         config.setTrustManagers( new TrustManager[]{ X509 } );
     }
-    
-    
+
+
     /**
      * Test a successful bind request
      *
@@ -124,9 +123,9 @@ public class LdapSSLConnectionTest exten
         {
             connection = new LdapNetworkConnection( config );
             BindResponse bindResponse = connection.bind( "uid=admin,ou=system", "secret" );
-            
+
             assertNotNull( bindResponse );
-            
+
             connection.unBind();
         }
         catch ( Exception le )
@@ -135,8 +134,8 @@ public class LdapSSLConnectionTest exten
             fail();
         }
     }
-    
-    
+
+
     @Test
     public void testGetSupportedControls() throws Exception
     {
@@ -144,7 +143,7 @@ public class LdapSSLConnectionTest exten
 
         DN dn = new DN( "uid=admin,ou=system" );
         connection.bind( dn.getName(), "secret" );
-        
+
         List<String> controlList = connection.getSupportedControls();
         assertNotNull( controlList );
         assertFalse( controlList.isEmpty() );

Modified: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=982337&r1=982336&r2=982337&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java Wed Aug  4 17:24:09 2010
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ *
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ *
  */
 package org.apache.directory.shared.ldap.schema.manager.impl;
 
@@ -35,7 +35,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.exception.LdapOtherException;
 import org.apache.directory.shared.ldap.exception.LdapProtocolErrorException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
@@ -166,7 +165,7 @@ public class DefaultSchemaManager implem
     //-----------------------------------------------------------------------
     /**
      * Clone the registries before doing any modification on it. Relax it
-     * too so that we can update it. 
+     * too so that we can update it.
      */
     private Registries cloneRegistries() throws LdapException
     {
@@ -174,17 +173,17 @@ public class DefaultSchemaManager implem
         {
             // Relax the controls at first
             errors = new ArrayList<Throwable>();
-    
+
             // Clone the Registries
             Registries clonedRegistries = registries.clone();
-    
+
             // And update references. We may have errors, that may be fixed
             // by the new loaded schemas.
             errors = clonedRegistries.checkRefInteg();
-    
+
             // Now, relax the cloned Registries if there is no error
             clonedRegistries.setRelaxed();
-    
+
             return clonedRegistries;
         }
         catch ( CloneNotSupportedException cnse )
@@ -226,7 +225,7 @@ public class DefaultSchemaManager implem
         // Create a content container for this schema
         registries.addSchema( schema.getSchemaName() );
 
-        // And inject any existing SchemaObject into the registries 
+        // And inject any existing SchemaObject into the registries
         try
         {
             addComparators( schema, registries );
@@ -876,7 +875,7 @@ public class DefaultSchemaManager implem
 
 
     /**
-     * Add the schemaObject into the registries. 
+     * Add the schemaObject into the registries.
      *
      * @param registries The Registries
      * @param schemaObject The SchemaObject containing the SchemaObject description
@@ -1262,7 +1261,7 @@ public class DefaultSchemaManager implem
         // Work on a cloned registries
         Registries clonedRegistries = cloneRegistries();
 
-        // Loop on all the schemas 
+        // Loop on all the schemas
         for ( Schema schema : schemas )
         {
             try
@@ -1686,7 +1685,7 @@ public class DefaultSchemaManager implem
                 return false;
             }
 
-            // At this point, the constructed AttributeType has not been checked against the 
+            // At this point, the constructed AttributeType has not been checked against the
             // existing Registries. It may be broken (missing SUP, or such), it will be checked
             // there, if the schema and the AttributeType are both enabled.
             Schema schema = getLoadedSchema( schemaName );
@@ -1705,7 +1704,7 @@ public class DefaultSchemaManager implem
             {
                 // As we may break the registries, work on a cloned registries
                 Registries clonedRegistries = null;
-                
+
                 try
                 {
                     clonedRegistries = registries.clone();
@@ -1818,7 +1817,7 @@ public class DefaultSchemaManager implem
             {
                 // As we may break the registries, work on a cloned registries
                 Registries clonedRegistries = null;
-                
+
                 try
                 {
                     clonedRegistries = registries.clone();
@@ -2011,10 +2010,10 @@ public class DefaultSchemaManager implem
 
 
     /**
-     * Tells if the SchemaManager is permissive or if it must be checked 
+     * Tells if the SchemaManager is permissive or if it must be checked
      * against inconsistencies.
      *
-     * @return True if SchemaObjects can be added even if they break the consistency 
+     * @return True if SchemaObjects can be added even if they break the consistency
      */
     public boolean isRelaxed()
     {
@@ -2025,7 +2024,7 @@ public class DefaultSchemaManager implem
     /**
      * Tells if the SchemaManager is strict.
      *
-     * @return True if SchemaObjects cannot be added if they break the consistency 
+     * @return True if SchemaObjects cannot be added if they break the consistency
      */
     public boolean isStrict()
     {



Mime
View raw message