directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235259 [1/2] - in /directory/apacheds/trunk: core-jndi/src/main/java/org/apache/directory/server/core/jndi/ core-jndi/src/test/java/org/apache/directory/server/core/jndi/ core-shared/src/main/java/org/apache/directory/server/core/shared/ ...
Date Tue, 24 Jan 2012 14:12:40 GMT
Author: elecharny
Date: Tue Jan 24 14:12:39 2012
New Revision: 1235259

URL: http://svn.apache.org/viewvc?rev=1235259&view=rev
Log:
Formatted the code using Directory formatter

Modified:
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ControlEnum.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
    directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultDnFactory.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/ReferralManagerImpl.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/SchemaService.java
    directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
    directory/apacheds/trunk/http-directory-bridge/src/main/java/org/apache/directory/server/bridge/http/HttpDirectoryService.java
    directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
    directory/apacheds/trunk/http-integration/src/main/java/org/apache/directory/server/integration/http/WebApp.java
    directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ControlEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ControlEnum.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ControlEnum.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ControlEnum.java Tue Jan 24 14:12:39 2012
@@ -27,15 +27,15 @@ package org.apache.directory.server.core
  */
 public enum ControlEnum
 {
-    CASCADE_CONTROL, 
-    ENTRY_CHANGE_CONTROL, 
-    SYNC_DONE_VALUE_CONTROL, 
-    MANAGE_DSA_IT_CONTROL, 
-    PAGED_RESULTS_CONTROL, 
-    PASSWORD_POLICY_REQUEST_CONTROL, 
-    PERSISTENT_SEARCH_CONTROL, 
-    SUBENTRIES_CONTROL, 
-    SYNC_INFO_VALUE_CONTROL, 
-    SYNC_REQUEST_VALUE_CONTROL, 
+    CASCADE_CONTROL,
+    ENTRY_CHANGE_CONTROL,
+    SYNC_DONE_VALUE_CONTROL,
+    MANAGE_DSA_IT_CONTROL,
+    PAGED_RESULTS_CONTROL,
+    PASSWORD_POLICY_REQUEST_CONTROL,
+    PERSISTENT_SEARCH_CONTROL,
+    SUBENTRIES_CONTROL,
+    SYNC_INFO_VALUE_CONTROL,
+    SYNC_REQUEST_VALUE_CONTROL,
     SYNC_STATE_VALUE_CONTROL
 }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/CoreContextFactory.java Tue Jan 24 14:12:39 2012
@@ -52,7 +52,7 @@ public class CoreContextFactory implemen
     {
         env = ( Hashtable<String, Object> ) env.clone();
         Dn principalDn = null;
-        
+
         try
         {
             principalDn = new Dn( getPrincipal( env ) );
@@ -61,7 +61,7 @@ public class CoreContextFactory implemen
         {
             throw new InvalidNameException( I18n.err( I18n.ERR_733, env ) );
         }
-        
+
         byte[] credential = getCredential( env );
         String providerUrl = getProviderUrl( env );
 
@@ -72,7 +72,7 @@ public class CoreContextFactory implemen
             throw new ConfigurationException( I18n.err( I18n.ERR_477, env ) );
         }
 
-        if ( ! service.isStarted() )
+        if ( !service.isStarted() )
         {
             return new DeadContext();
         }
@@ -85,12 +85,12 @@ public class CoreContextFactory implemen
         }
         catch ( Exception e )
         {
-            JndiUtils.wrap(e);
+            JndiUtils.wrap( e );
         }
 
         // check to make sure we have access to the specified dn in provider URL
         ctx.lookup( "" );
-        return ctx;        
+        return ctx;
     }
 
 
@@ -140,7 +140,7 @@ public class CoreContextFactory implemen
         }
         else if ( value instanceof String )
         {
-            credential = Strings.getBytesUtf8((String) value);
+            credential = Strings.getBytesUtf8( ( String ) value );
         }
         else if ( value instanceof byte[] )
         {
@@ -160,7 +160,7 @@ public class CoreContextFactory implemen
     }
 
 
-    public static String getPrincipal( Hashtable<String,Object> env )
+    public static String getPrincipal( Hashtable<String, Object> env )
     {
         String principal;
         Object value = env.get( Context.SECURITY_PRINCIPAL );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/DeadContext.java Tue Jan 24 14:12:39 2012
@@ -130,6 +130,7 @@ public class DeadContext implements Ldap
         throw new ServiceUnavailableException( EXCEPTION_MSG );
     }
 
+
     public DirContext getSchema( String name ) throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
@@ -220,7 +221,8 @@ public class DeadContext implements Ldap
     }
 
 
-    public NamingEnumeration<SearchResult> search( String name, Attributes matchingAttributes, String[] attributesToReturn )
+    public NamingEnumeration<SearchResult> search( String name, Attributes matchingAttributes,
+        String[] attributesToReturn )
         throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
@@ -234,26 +236,30 @@ public class DeadContext implements Ldap
     }
 
 
-    public NamingEnumeration<SearchResult> search( String name, String filter, SearchControls cons ) throws NamingException
+    public NamingEnumeration<SearchResult> search( String name, String filter, SearchControls cons )
+        throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
     }
 
 
-    public NamingEnumeration<SearchResult> search( Name name, String filter, SearchControls cons ) throws NamingException
+    public NamingEnumeration<SearchResult> search( Name name, String filter, SearchControls cons )
+        throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
     }
 
 
-    public NamingEnumeration<SearchResult> search( String name, String filterExpr, Object[] filterArgs, SearchControls cons )
+    public NamingEnumeration<SearchResult> search( String name, String filterExpr, Object[] filterArgs,
+        SearchControls cons )
         throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
     }
 
 
-    public NamingEnumeration<SearchResult> search( Name name, String filterExpr, Object[] filterArgs, SearchControls cons )
+    public NamingEnumeration<SearchResult> search( Name name, String filterExpr, Object[] filterArgs,
+        SearchControls cons )
         throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
@@ -284,7 +290,7 @@ public class DeadContext implements Ldap
     }
 
 
-    public Hashtable<String,Object>  getEnvironment() throws NamingException
+    public Hashtable<String, Object> getEnvironment() throws NamingException
     {
         throw new ServiceUnavailableException( EXCEPTION_MSG );
     }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java Tue Jan 24 14:12:39 2012
@@ -67,25 +67,26 @@ public class EventListenerAdapter implem
     private static final Logger LOG = LoggerFactory.getLogger( EventListenerAdapter.class );
     private final NamingListener listener;
     private final ServerLdapContext source;
-    
+
+
     public EventListenerAdapter( ServerLdapContext source, NamingListener listener )
     {
         this( source, listener, new SearchControls() );
     }
-    
-    
+
+
     public EventListenerAdapter( ServerLdapContext source, NamingListener listener, SearchControls controls )
     {
         this.source = source;
         this.listener = listener;
     }
-    
-    
+
+
     private void deliverNamingExceptionEvent( Exception e )
     {
         LOG.error( I18n.err( I18n.ERR_118 ), e );
         NamingExceptionEvent evt = null;
-        
+
         if ( e instanceof NamingException )
         {
             evt = new NamingExceptionEvent( source, ( NamingException ) e );
@@ -96,10 +97,10 @@ public class EventListenerAdapter implem
             ne.setRootCause( e );
             evt = new NamingExceptionEvent( source, ne );
         }
-        
+
         listener.namingExceptionThrown( evt );
     }
-    
+
 
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.event.DirectoryListener#entryAdded(org.apache.directory.server.core.interceptor.context.AddOperationContext)
@@ -108,9 +109,9 @@ public class EventListenerAdapter implem
     {
         try
         {
-            Binding binding = new Binding( addContext.getDn().getName(), 
+            Binding binding = new Binding( addContext.getDn().getName(),
                 ServerEntryUtils.toBasicAttributes( addContext.getEntry() ), false );
-            NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_ADDED, 
+            NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_ADDED,
                 binding, null, addContext );
 
             if ( listener instanceof NamespaceChangeListener )
@@ -134,9 +135,9 @@ public class EventListenerAdapter implem
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding binding = new Binding( deleteContext.getDn().getName(), 
+                Binding binding = new Binding( deleteContext.getDn().getName(),
                     ServerEntryUtils.toBasicAttributes( deleteContext.getEntry() ), false );
-                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_REMOVED, null, 
+                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_REMOVED, null,
                     binding, deleteContext );
                 ( ( NamespaceChangeListener ) listener ).objectAdded( evt );
             }
@@ -155,11 +156,12 @@ public class EventListenerAdapter implem
     {
         try
         {
-            Binding newBinding = new Binding( modifyContext.getDn().getName(), 
+            Binding newBinding = new Binding( modifyContext.getDn().getName(),
                 ServerEntryUtils.toBasicAttributes( modifyContext.getEntry() ), false );
-            Binding oldBinding = new Binding( modifyContext.getDn().getName(), 
-                ServerEntryUtils.toBasicAttributes( ((ClonedServerEntry)modifyContext.getEntry()).getOriginalEntry() ),  false );
-            NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_CHANGED, 
+            Binding oldBinding = new Binding( modifyContext.getDn().getName(),
+                ServerEntryUtils.toBasicAttributes( ( ( ClonedServerEntry ) modifyContext.getEntry() )
+                    .getOriginalEntry() ), false );
+            NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_CHANGED,
                 newBinding, oldBinding, modifyContext );
 
             if ( listener instanceof ObjectChangeListener )
@@ -183,11 +185,12 @@ public class EventListenerAdapter implem
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( moveContext.getDn().getName(), 
+                Binding newBinding = new Binding( moveContext.getDn().getName(),
                     ServerEntryUtils.toBasicAttributes( moveContext.getEntry() ), false );
-                Binding oldBinding = new Binding( moveContext.getDn().getName(), 
-                    ServerEntryUtils.toBasicAttributes( ((ClonedServerEntry)moveContext.getEntry()).getOriginalEntry() ), false );
-                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
+                Binding oldBinding = new Binding( moveContext.getDn().getName(),
+                    ServerEntryUtils.toBasicAttributes( ( ( ClonedServerEntry ) moveContext.getEntry() )
+                        .getOriginalEntry() ), false );
+                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED,
                     newBinding, oldBinding, moveContext );
                 ( ( NamespaceChangeListener ) listener ).objectRenamed( evt );
             }
@@ -208,11 +211,12 @@ public class EventListenerAdapter implem
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( moveAndRenameContext.getDn().getName(), 
+                Binding newBinding = new Binding( moveAndRenameContext.getDn().getName(),
                     ServerEntryUtils.toBasicAttributes( moveAndRenameContext.getEntry() ), false );
-                Binding oldBinding = new Binding( moveAndRenameContext.getDn().getName(), 
-                    ServerEntryUtils.toBasicAttributes( ((ClonedServerEntry)moveAndRenameContext.getEntry()).getOriginalEntry() ), false );
-                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
+                Binding oldBinding = new Binding( moveAndRenameContext.getDn().getName(),
+                    ServerEntryUtils.toBasicAttributes( ( ( ClonedServerEntry ) moveAndRenameContext.getEntry() )
+                        .getOriginalEntry() ), false );
+                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED,
                     newBinding, oldBinding, moveAndRenameContext );
                 ( ( NamespaceChangeListener ) listener ).objectRenamed( evt );
             }
@@ -233,11 +237,12 @@ public class EventListenerAdapter implem
         {
             if ( listener instanceof NamespaceChangeListener )
             {
-                Binding newBinding = new Binding( renameContext.getDn().getName(), 
+                Binding newBinding = new Binding( renameContext.getDn().getName(),
                     ServerEntryUtils.toBasicAttributes( renameContext.getEntry() ), false );
-                Binding oldBinding = new Binding( renameContext.getDn().getName(), 
-                    ServerEntryUtils.toBasicAttributes( ((ClonedServerEntry)renameContext.getEntry()).getOriginalEntry() ), false );
-                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED, 
+                Binding oldBinding = new Binding( renameContext.getDn().getName(),
+                    ServerEntryUtils.toBasicAttributes( ( ( ClonedServerEntry ) renameContext.getEntry() )
+                        .getOriginalEntry() ), false );
+                NamingEvent evt = new NamingEvent( source, NamingEvent.OBJECT_RENAMED,
                     newBinding, oldBinding, null );
                 ( ( NamespaceChangeListener ) listener ).objectRenamed( evt );
             }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/JavaLdapSupport.java Tue Jan 24 14:12:39 2012
@@ -85,7 +85,7 @@ class JavaLdapSupport
     {
         ObjectInputStream in = null;
         String className = null;
-        
+
         try
         {
             className = ( String ) serverEntry.get( JCLASSNAME_ATTR ).getString();
@@ -101,7 +101,7 @@ class JavaLdapSupport
         {
             byte[] data = ( byte[] ) serverEntry.get( JSERIALDATA_ATTR ).getBytes();
             in = new ObjectInputStream( new ByteArrayInputStream( data ) );
-            
+
             return in.readObject();
         }
         catch ( Exception e )
@@ -186,10 +186,10 @@ class JavaLdapSupport
          * objectClass: javaSerializedObject
          */
         entry.put( SchemaConstants.OBJECT_CLASS_AT,
-                SchemaConstants.TOP_OC,
-                JOBJECT_ATTR,
-                JCONTAINER_ATTR,
-                JSERIALIZEDOBJ_ATTR );
+            SchemaConstants.TOP_OC,
+            JOBJECT_ATTR,
+            JCONTAINER_ATTR,
+            JSERIALIZEDOBJ_ATTR );
 
         // Add the javaClassName and javaSerializedData attributes
         entry.put( JCLASSNAME_ATTR, obj.getClass().getName() );

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/LdapJndiProperties.java Tue Jan 24 14:12:39 2012
@@ -75,7 +75,7 @@ public class LdapJndiProperties
         }
         else if ( !( authentication instanceof String ) )
         {
-            throw new ConfigurationException( I18n.err( I18n.ERR_483, authentication.getClass(), 
+            throw new ConfigurationException( I18n.err( I18n.ERR_483, authentication.getClass(),
                 Context.SECURITY_AUTHENTICATION ) );
         }
         else
@@ -163,7 +163,7 @@ public class LdapJndiProperties
         }
         else if ( !( authentication instanceof String ) )
         {
-            throw new ConfigurationException( I18n.err( I18n.ERR_483, authentication.getClass(), 
+            throw new ConfigurationException( I18n.err( I18n.ERR_483, authentication.getClass(),
                 Context.SECURITY_AUTHENTICATION ) );
         }
         else
@@ -180,14 +180,14 @@ public class LdapJndiProperties
             {
                 props.level = AuthenticationLevel.STRONG;
                 props.saslMechanism = ( String ) authentication;
-//                String[] mechList = ( ( String ) authentication ).trim().split( " " );
-//                for ( String mech : mechList )
-//                {
-//                    if ( !mech.trim().equals( "" ) )
-//                    {
-//                        props.mechanisms.add( mech );
-//                    }
-//                }
+                //                String[] mechList = ( ( String ) authentication ).trim().split( " " );
+                //                for ( String mech : mechList )
+                //                {
+                //                    if ( !mech.trim().equals( "" ) )
+                //                    {
+                //                        props.mechanisms.add( mech );
+                //                    }
+                //                }
             }
         }
 
@@ -224,7 +224,6 @@ public class LdapJndiProperties
             }
 
         }
-        
 
         if ( env.get( SASL_AUTHID ) != null && props.level == AuthenticationLevel.STRONG )
         {
@@ -252,7 +251,7 @@ public class LdapJndiProperties
         {
             if ( credobj instanceof String )
             {
-                props.credentials = Strings.getBytesUtf8((String) credobj);
+                props.credentials = Strings.getBytesUtf8( ( String ) credobj );
             }
             else if ( credobj instanceof byte[] )
             {
@@ -260,7 +259,8 @@ public class LdapJndiProperties
             }
             else
             {
-                throw new ConfigurationException( I18n.err( I18n.ERR_483, credobj.getClass(), Context.SECURITY_CREDENTIALS ) );
+                throw new ConfigurationException( I18n.err( I18n.ERR_483, credobj.getClass(),
+                    Context.SECURITY_CREDENTIALS ) );
             }
         }
 

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/NamingEnumerationAdapter.java Tue Jan 24 14:12:39 2012
@@ -41,14 +41,14 @@ public class NamingEnumerationAdapter im
 {
     private final EntryFilteringCursor cursor;
     private boolean available = false;
-    
-    
+
+
     public NamingEnumerationAdapter( EntryFilteringCursor cursor ) throws NamingException
     {
         this.cursor = cursor;
         try
         {
-            if ( ! cursor.first() )
+            if ( !cursor.first() )
             {
                 cursor.close();
                 available = false;
@@ -63,8 +63,8 @@ public class NamingEnumerationAdapter im
             JndiUtils.wrap( e );
         }
     }
-    
-    
+
+
     /* 
      * @see NamingEnumeration#close()
      */
@@ -97,11 +97,11 @@ public class NamingEnumerationAdapter im
     public SearchResult next() throws NamingException
     {
         Entry entry = null;
-        
+
         try
         {
             entry = cursor.get();
-            
+
             if ( cursor.next() )
             {
                 available = true;
@@ -116,11 +116,11 @@ public class NamingEnumerationAdapter im
         {
             JndiUtils.wrap( e );
         }
-        
-        SearchResult result = new SearchResult( entry.getDn().getName(), null, 
+
+        SearchResult result = new SearchResult( entry.getDn().getName(), null,
             ServerEntryUtils.toBasicAttributes( entry ) );
         result.setRelative( false );
-        
+
         return result;
     }
 

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Tue Jan 24 14:12:39 2012
@@ -155,8 +155,8 @@ public abstract class ServerContext impl
     private final Dn dn;
 
     /** The set of registered NamingListeners */
-    private final Map<NamingListener,DirectoryListener> listeners =
-        new HashMap<NamingListener,DirectoryListener>();
+    private final Map<NamingListener, DirectoryListener> listeners =
+        new HashMap<NamingListener, DirectoryListener>();
 
     /** The request controls to set on operations before performing them */
     protected Control[] requestControls = EMPTY_CONTROLS;
@@ -186,7 +186,7 @@ public abstract class ServerContext impl
         ADS_CONTROLS.put( SyncRequestValue.OID, ControlEnum.SYNC_REQUEST_VALUE_CONTROL );
         ADS_CONTROLS.put( SyncStateValue.OID, ControlEnum.SYNC_STATE_VALUE_CONTROL );
     }
-    
+
 
     // ------------------------------------------------------------------------
     // Constructors
@@ -224,8 +224,8 @@ public abstract class ServerContext impl
         OperationManager operationManager = service.getOperationManager();
 
         HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( session, dn );
-        
-        if ( ! operationManager.hasEntry( hasEntryContext ) )
+
+        if ( !operationManager.hasEntry( hasEntryContext ) )
         {
             throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
         }
@@ -259,8 +259,8 @@ public abstract class ServerContext impl
         OperationManager operationManager = service.getOperationManager();
 
         HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( session, dn );
-        
-        if ( ! operationManager.hasEntry( hasEntryContext ) )
+
+        if ( !operationManager.hasEntry( hasEntryContext ) )
         {
             throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
         }
@@ -283,8 +283,8 @@ public abstract class ServerContext impl
         OperationManager operationManager = service.getOperationManager();
 
         HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( session, dn );
-        
-        if ( ! operationManager.hasEntry( hasEntryContext ) )
+
+        if ( !operationManager.hasEntry( hasEntryContext ) )
         {
             throw new NameNotFoundException( I18n.err( I18n.ERR_490, dn ) );
         }
@@ -302,11 +302,11 @@ public abstract class ServerContext impl
      */
     protected void injectReferralControl( OperationContext opCtx )
     {
-        if ( "ignore".equalsIgnoreCase( (String)env.get( Context.REFERRAL ) ) )
+        if ( "ignore".equalsIgnoreCase( ( String ) env.get( Context.REFERRAL ) ) )
         {
             opCtx.ignoreReferral();
         }
-        else if ( "throw".equalsIgnoreCase( (String)env.get( Context.REFERRAL ) ) )
+        else if ( "throw".equalsIgnoreCase( ( String ) env.get( Context.REFERRAL ) ) )
         {
             opCtx.throwReferral();
         }
@@ -316,6 +316,8 @@ public abstract class ServerContext impl
             opCtx.throwReferral();
         }
     }
+
+
     // ------------------------------------------------------------------------
     // Protected Methods for Operations
     // ------------------------------------------------------------------------
@@ -389,17 +391,17 @@ public abstract class ServerContext impl
         {
             case CASCADE_CONTROL:
                 control = new CascadeDecorator( getDirectoryService().getLdapCodecService(), new CascadeImpl() );
-                
+
                 break;
 
             case ENTRY_CHANGE_CONTROL:
                 control = new EntryChangeDecorator( getDirectoryService().getLdapCodecService() );
-                
+
                 break;
 
             case MANAGE_DSA_IT_CONTROL:
                 control = new ManageDsaITDecorator( getDirectoryService().getLdapCodecService(), new ManageDsaITImpl() );
-                
+
                 break;
 
             case PAGED_RESULTS_CONTROL:
@@ -428,12 +430,12 @@ public abstract class ServerContext impl
 
             case SUBENTRIES_CONTROL:
                 control = new SubentriesDecorator( getDirectoryService().getLdapCodecService() );
-                
+
                 break;
 
             case SYNC_DONE_VALUE_CONTROL:
                 control = new SyncDoneValueDecorator( getDirectoryService().getLdapCodecService() );
-                
+
                 break;
 
             case SYNC_INFO_VALUE_CONTROL:
@@ -454,9 +456,9 @@ public abstract class ServerContext impl
 
         control.setCritical( jndiControl.isCritical() );
         control.setValue( jndiControl.getEncodedValue() );
-        
+
         byte[] value = jndiControl.getEncodedValue();
-        
+
         if ( !Strings.isEmpty( value ) )
         {
             control.decode( value );
@@ -465,6 +467,7 @@ public abstract class ServerContext impl
         return control;
     }
 
+
     /**
      * Convert the JNDI controls to ADS controls
      * TODO convertControls.
@@ -510,7 +513,7 @@ public abstract class ServerContext impl
         Object typesOnlyObj = getEnvironment().get( "java.naming.ldap.typesOnly" );
         boolean typesOnly = false;
 
-        if( typesOnlyObj != null )
+        if ( typesOnlyObj != null )
         {
             typesOnly = Boolean.parseBoolean( typesOnlyObj.toString() );
         }
@@ -523,10 +526,11 @@ public abstract class ServerContext impl
         // should be asked to be returned.
         if ( ( searchControls.getSearchScope() == SearchControls.OBJECT_SCOPE )
             && ( ( searchControls.getReturningAttributes() != null )
-                && ( searchControls.getReturningAttributes().length == 0 ) )
+            && ( searchControls.getReturningAttributes().length == 0 ) )
             && ( filter instanceof EqualityNode ) )
         {
-            CompareOperationContext compareContext = new CompareOperationContext( session, dn, ((EqualityNode <?>)filter).getAttribute(), ((EqualityNode)filter).getValue() );
+            CompareOperationContext compareContext = new CompareOperationContext( session, dn,
+                ( ( EqualityNode<?> ) filter ).getAttribute(), ( ( EqualityNode ) filter ).getValue() );
 
             // Inject the referral handling into the operation context
             injectReferralControl( compareContext );
@@ -540,7 +544,7 @@ public abstract class ServerContext impl
             searchContext.setAliasDerefMode( aliasDerefMode );
             searchContext.addRequestControls( convertControls( true, requestControls ) );
 
-            searchContext.setTypesOnly(  typesOnly );
+            searchContext.setTypesOnly( typesOnly );
 
             if ( result )
             {
@@ -560,7 +564,7 @@ public abstract class ServerContext impl
             searchContext = new SearchOperationContext( session, dn, filter, searchControls );
             searchContext.setAliasDerefMode( aliasDerefMode );
             searchContext.addRequestControls( convertControls( true, requestControls ) );
-            searchContext.setTypesOnly(  typesOnly );
+            searchContext.setTypesOnly( typesOnly );
 
             // Inject the referral handling into the operation context
             injectReferralControl( searchContext );
@@ -604,11 +608,11 @@ public abstract class ServerContext impl
     {
         GetRootDseOperationContext getRootDseContext = new GetRootDseOperationContext( session, target );
         getRootDseContext.addRequestControls( convertControls( true, requestControls ) );
-        
+
         // do not reset request controls since this is not an external
         // operation and not do bother setting the response controls either
         OperationManager operationManager = service.getOperationManager();
-        
+
         return operationManager.getRootDse( getRootDseContext );
     }
 
@@ -654,7 +658,7 @@ public abstract class ServerContext impl
         // Now remove the ObjectClass attribute if it has not been requested
         if ( ( lookupContext.getAttrsId() != null ) && ( lookupContext.getAttrsId().size() != 0 ) &&
             ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
-                && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) ) )
+            && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) ) )
         {
             serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );
         }
@@ -697,8 +701,9 @@ public abstract class ServerContext impl
         throws Exception
     {
         // setup the op context and populate with request controls
-        MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( session, oldDn, parent, new Rdn(
-            newRdn ), delOldDn );
+        MoveAndRenameOperationContext moveAndRenameContext = new MoveAndRenameOperationContext( session, oldDn, parent,
+            new Rdn(
+                newRdn ), delOldDn );
         moveAndRenameContext.addRequestControls( convertControls( true, requestControls ) );
 
         // Inject the referral handling into the operation context
@@ -824,7 +829,6 @@ public abstract class ServerContext impl
     // Protected Accessor Methods
     // ------------------------------------------------------------------------
 
-
     /**
      * Gets the distinguished name of the entry associated with this Context.
      *
@@ -930,7 +934,7 @@ public abstract class ServerContext impl
         }
         catch ( LdapException le )
         {
-            throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
+            throw new SchemaViolationException( I18n.err( I18n.ERR_491, name ) );
         }
 
         // Now add the CN attribute, which is mandatory
@@ -945,13 +949,13 @@ public abstract class ServerContext impl
             else
             {
                 // No CN in the rdn, this is an error
-                throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
+                throw new SchemaViolationException( I18n.err( I18n.ERR_491, name ) );
             }
         }
         else
         {
             // No CN in the rdn, this is an error
-            throw new SchemaViolationException( I18n.err( I18n.ERR_491, name) );
+            throw new SchemaViolationException( I18n.err( I18n.ERR_491, name ) );
         }
 
         /*
@@ -1060,8 +1064,8 @@ public abstract class ServerContext impl
 
         try
         {
-            outServerEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive(res
-                    .getAttributes()), target, service.getSchemaManager() );
+            outServerEntry = ServerEntryUtils.toServerEntry( AttributeUtils.toCaseInsensitive( res
+                .getAttributes() ), target, service.getSchemaManager() );
         }
         catch ( LdapInvalidAttributeTypeException liate )
         {
@@ -1232,7 +1236,6 @@ public abstract class ServerContext impl
 
         newParent = newParent.getParent();
 
-
         Rdn oldRdn = oldDn.getRdn();
         Rdn newRdn = newDn.getRdn();
         boolean delOldRdn = true;
@@ -1315,7 +1318,7 @@ public abstract class ServerContext impl
         try
         {
             HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( session, target );
-            
+
             if ( operationManager.hasEntry( hasEntryContext ) )
             {
                 doDeleteOperation( target );
@@ -1360,7 +1363,7 @@ public abstract class ServerContext impl
      */
     public Object lookup( String name ) throws NamingException
     {
-        if ( Strings.isEmpty(name) )
+        if ( Strings.isEmpty( name ) )
         {
             return lookup( new LdapName( "" ) );
         }
@@ -1530,7 +1533,7 @@ public abstract class ServerContext impl
     {
         try
         {
-            return new NamingEnumerationAdapter( doListOperation( buildTarget( JndiUtils.fromName(name) ) ) );
+            return new NamingEnumerationAdapter( doListOperation( buildTarget( JndiUtils.fromName( name ) ) ) );
         }
         catch ( Exception e )
         {
@@ -1614,7 +1617,7 @@ public abstract class ServerContext impl
 
         // 1). Find the Dn for name and walk it from the head to tail
         Dn fqn = buildTarget( JndiUtils.fromName( name ) );
-        
+
         try
         {
             return JndiUtils.toName( JndiUtils.fromName( prefix ).add( fqn ) );
@@ -1717,7 +1720,7 @@ public abstract class ServerContext impl
             target = target.add( relativeName );
             target.apply( schemaManager );
         }
-        catch (LdapInvalidDnException lide )
+        catch ( LdapInvalidDnException lide )
         {
             throw new InvalidNameException( lide.getMessage() );
         }

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerDirContext.java Tue Jan 24 14:12:39 2012
@@ -121,7 +121,6 @@ public abstract class ServerDirContext e
     // DirContext Implementations
     // ------------------------------------------------------------------------
 
-
     public ServerDirContext( DirectoryService service, CoreSession session, Name bindDn ) throws Exception
     {
         super( service, session, bindDn );
@@ -176,7 +175,8 @@ public abstract class ServerDirContext e
         Attributes attrs = null;
         try
         {
-            attrs = ServerEntryUtils.toBasicAttributes( doLookupOperation( buildTarget( JndiUtils.fromName( name ) ), attrIds ) );
+            attrs = ServerEntryUtils.toBasicAttributes( doLookupOperation( buildTarget( JndiUtils.fromName( name ) ),
+                attrIds ) );
         }
         catch ( Exception e )
         {
@@ -193,7 +193,7 @@ public abstract class ServerDirContext e
      */
     public void modifyAttributes( String name, int modOp, Attributes attrs ) throws NamingException
     {
-        modifyAttributes( new LdapName( name ), modOp, AttributeUtils.toCaseInsensitive(attrs) );
+        modifyAttributes( new LdapName( name ), modOp, AttributeUtils.toCaseInsensitive( attrs ) );
     }
 
 
@@ -237,7 +237,7 @@ public abstract class ServerDirContext e
         {
             doModifyOperation( buildTarget( JndiUtils.fromName( name ) ), newMods );
         }
-        catch( Exception e )
+        catch ( Exception e )
         {
             JndiUtils.wrap( e );
         }
@@ -528,7 +528,7 @@ public abstract class ServerDirContext e
         try
         {
             HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( getSession(), target );
-            
+
             if ( getDirectoryService().getOperationManager().hasEntry( hasEntryContext ) )
             {
                 doDeleteOperation( target );
@@ -595,7 +595,6 @@ public abstract class ServerDirContext e
             JndiUtils.wrap( e );
         }
 
-
         return ctx;
     }
 
@@ -724,7 +723,8 @@ public abstract class ServerDirContext e
                 }
                 else
                 {
-                    node = new EqualityNode<String>( attributeType, new org.apache.directory.shared.ldap.model.entry.StringValue( ( String ) value ) );
+                    node = new EqualityNode<String>( attributeType,
+                        new org.apache.directory.shared.ldap.model.entry.StringValue( ( String ) value ) );
                 }
 
                 AliasDerefMode aliasDerefMode = AliasDerefMode.getEnum( getEnvironment() );
@@ -736,7 +736,7 @@ public abstract class ServerDirContext e
                 }
                 catch ( Exception e )
                 {
-                    JndiUtils.wrap(e);
+                    JndiUtils.wrap( e );
                     return null; // shut compiler up
                 }
             }
@@ -778,7 +778,8 @@ public abstract class ServerDirContext e
                 // Add simpel Ava node if its value is a String
                 if ( val instanceof String )
                 {
-                    node = new EqualityNode<String>( attr.getID(), new org.apache.directory.shared.ldap.model.entry.StringValue( ( String ) val ) );
+                    node = new EqualityNode<String>( attr.getID(),
+                        new org.apache.directory.shared.ldap.model.entry.StringValue( ( String ) val ) );
                     filter.addNode( node );
                 }
             }
@@ -958,7 +959,6 @@ public abstract class ServerDirContext e
     // EventDirContext implementations
     // ------------------------------------------------------------------------
 
-
     public void addNamingListener( Name name, String filterStr, SearchControls searchControls,
         NamingListener namingListener ) throws NamingException
     {
@@ -966,7 +966,7 @@ public abstract class ServerDirContext e
 
         try
         {
-            filter = FilterParser.parse(schemaManager, filterStr);
+            filter = FilterParser.parse( schemaManager, filterStr );
         }
         catch ( Exception e )
         {

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerLdapContext.java Tue Jan 24 14:12:39 2012
@@ -204,16 +204,16 @@ public class ServerLdapContext extends S
 
         // make sure we add the request controls to operation
         try
-        { 
+        {
             if ( attributeType.getSyntax().isHumanReadable() )
             {
                 if ( value instanceof String )
                 {
-                    val = new StringValue( attributeType, (String)value );
+                    val = new StringValue( attributeType, ( String ) value );
                 }
                 else if ( value instanceof byte[] )
                 {
-                    val = new StringValue( attributeType, Strings.utf8ToString((byte[]) value) );
+                    val = new StringValue( attributeType, Strings.utf8ToString( ( byte[] ) value ) );
                 }
                 else
                 {
@@ -224,11 +224,11 @@ public class ServerLdapContext extends S
             {
                 if ( value instanceof String )
                 {
-                    val = new BinaryValue( attributeType, Strings.getBytesUtf8((String) value) );
+                    val = new BinaryValue( attributeType, Strings.getBytesUtf8( ( String ) value ) );
                 }
                 else if ( value instanceof byte[] )
                 {
-                    val = new BinaryValue( attributeType, (byte[])value );
+                    val = new BinaryValue( attributeType, ( byte[] ) value );
                 }
                 else
                 {
@@ -242,10 +242,10 @@ public class ServerLdapContext extends S
         }
 
         CompareOperationContext opCtx = new CompareOperationContext( getSession(), name, oid, val );
-        
+
         try
         {
-            opCtx.addRequestControls( JndiUtils.fromJndiControls( getDirectoryService().getLdapCodecService(), 
+            opCtx.addRequestControls( JndiUtils.fromJndiControls( getDirectoryService().getLdapCodecService(),
                 requestControls ) );
         }
         catch ( DecoderException e1 )
@@ -264,7 +264,7 @@ public class ServerLdapContext extends S
         }
         catch ( Exception e )
         {
-            JndiUtils.wrap(e);
+            JndiUtils.wrap( e );
         }
 
         // extract the response controls from the operation and return
@@ -285,10 +285,10 @@ public class ServerLdapContext extends S
     public void ldapUnbind() throws NamingException
     {
         UnbindOperationContext opCtx = new UnbindOperationContext( getSession() );
-        
+
         try
         {
-            opCtx.addRequestControls( JndiUtils.fromJndiControls( getDirectoryService().getLdapCodecService(), 
+            opCtx.addRequestControls( JndiUtils.fromJndiControls( getDirectoryService().getLdapCodecService(),
                 requestControls ) );
         }
         catch ( DecoderException e1 )

Modified: directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java (original)
+++ directory/apacheds/trunk/core-jndi/src/test/java/org/apache/directory/server/core/jndi/LdapJndiPropertiesTest.java Tue Jan 24 14:12:39 2012
@@ -37,6 +37,7 @@ import static org.junit.Assert.fail;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+
 /**
  * Tests the LdapJndiProperties.
  *
@@ -51,7 +52,7 @@ public class LdapJndiPropertiesTest
     {
         try
         {
-            LdapJndiProperties.getLdapJndiProperties( new Hashtable<String,Object>() );
+            LdapJndiProperties.getLdapJndiProperties( new Hashtable<String, Object>() );
             fail( "should never get here" );
         }
         catch ( ConfigurationException e )
@@ -77,20 +78,20 @@ public class LdapJndiPropertiesTest
     @Test
     public void testNoAuthWithCredsEnv() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
         env.put( Context.SECURITY_CREDENTIALS, "asdf" );
         env.put( Context.PROVIDER_URL, "" );
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
         assertEquals( AuthenticationLevel.SIMPLE, props.getAuthenticationLevel() );
-        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8("asdf"), props.getCredentials() ) );
+        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8( "asdf" ), props.getCredentials() ) );
     }
 
 
     @Test
     public void testNoAuthWithNoCredsEnv() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, "" );
         env.put( Context.PROVIDER_URL, "" );
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
@@ -102,7 +103,7 @@ public class LdapJndiPropertiesTest
     @Test
     public void testAuthWithNoCredsEnv() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, "" );
         env.put( Context.SECURITY_AUTHENTICATION, "simple" );
         try
@@ -119,7 +120,7 @@ public class LdapJndiPropertiesTest
     @Test
     public void testAuthWithNoCredsStrong() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, "" );
         env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
         env.put( Context.PROVIDER_URL, "" );
@@ -132,13 +133,13 @@ public class LdapJndiPropertiesTest
     @Test
     public void testAuthWithCredsStrong() throws Exception
     {
-        Hashtable<String,Object> env = new Hashtable<String,Object>();
+        Hashtable<String, Object> env = new Hashtable<String, Object>();
         env.put( Context.SECURITY_PRINCIPAL, "" );
         env.put( Context.SECURITY_CREDENTIALS, "asdf" );
         env.put( Context.SECURITY_AUTHENTICATION, "DIGEST-MD5 CRAM-MD5" );
         env.put( Context.PROVIDER_URL, "" );
         LdapJndiProperties props = LdapJndiProperties.getLdapJndiProperties( env );
         assertEquals( AuthenticationLevel.STRONG, props.getAuthenticationLevel() );
-        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8("asdf"), props.getCredentials() ) );
+        assertTrue( ArrayUtils.isEquals( Strings.getBytesUtf8( "asdf" ), props.getCredentials() ) );
     }
 }

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultCoreSession.java Tue Jan 24 14:12:39 2012
@@ -89,13 +89,13 @@ public class DefaultCoreSession implemen
 {
     /** The DirectoryService we are connected to */
     private final DirectoryService directoryService;
-    
+
     /** The Principal used to process operations */
     private final LdapPrincipal authenticatedPrincipal;
-    
+
     /** The anonymous principal, if we have to process operation as anonymous */
     private final LdapPrincipal anonymousPrincipal;
-    
+
     /** The authorized principal, which will be used when a user has been authorized */
     private LdapPrincipal authorizedPrincipal;
 
@@ -226,7 +226,7 @@ public class DefaultCoreSession implemen
             }
             else if ( value instanceof byte[] )
             {
-                val = new StringValue( attributeType, Strings.utf8ToString((byte[]) value) );
+                val = new StringValue( attributeType, Strings.utf8ToString( ( byte[] ) value ) );
             }
             else
             {
@@ -237,7 +237,7 @@ public class DefaultCoreSession implemen
         {
             if ( value instanceof String )
             {
-                val = new BinaryValue( attributeType, Strings.getBytesUtf8((String) value) );
+                val = new BinaryValue( attributeType, Strings.getBytesUtf8( ( String ) value ) );
             }
             else if ( value instanceof byte[] )
             {
@@ -445,7 +445,7 @@ public class DefaultCoreSession implemen
     public boolean isAdministrator()
     {
         String normName = getEffectivePrincipal().getName();
-        
+
         return normName.equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED );
     }
 
@@ -535,7 +535,7 @@ public class DefaultCoreSession implemen
     {
         OperationManager operationManager = directoryService.getOperationManager();
         LookupOperationContext lookupContext = new LookupOperationContext( this, dn, attrIds );
-        
+
         if ( controls != null )
         {
             lookupContext.addRequestControls( controls );
@@ -889,7 +889,7 @@ public class DefaultCoreSession implemen
         deleteContext.setLogChange( log );
 
         OperationManager operationManager = directoryService.getOperationManager();
-        
+
         try
         {
             operationManager.delete( deleteContext );
@@ -902,8 +902,8 @@ public class DefaultCoreSession implemen
 
         deleteRequest.getResultResponse().addAllControls( deleteContext.getResponseControls() );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -920,7 +920,7 @@ public class DefaultCoreSession implemen
     {
         HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( this, dn );
         OperationManager operationManager = directoryService.getOperationManager();
-        
+
         return operationManager.hasEntry( hasEntryContext );
     }
 
@@ -1090,7 +1090,7 @@ public class DefaultCoreSession implemen
     public void unbind() throws LdapException
     {
         UnbindOperationContext unbindContext = new UnbindOperationContext( this );
-        
+
         OperationManager operationManager = directoryService.getOperationManager();
         operationManager.unbind( unbindContext );
     }
@@ -1102,7 +1102,7 @@ public class DefaultCoreSession implemen
     public void unbind( UnbindRequest unbindRequest ) throws LdapException
     {
         UnbindOperationContext unbindContext = new UnbindOperationContext( this, unbindRequest );
-        
+
         OperationManager operationManager = directoryService.getOperationManager();
         operationManager.unbind( unbindContext );
     }

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultDnFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultDnFactory.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultDnFactory.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/DefaultDnFactory.java Tue Jan 24 14:12:39 2012
@@ -92,7 +92,7 @@ public class DefaultDnFactory implements
 
             if ( dnCacheEntry != null )
             {
-                cachedDn = (Dn) dnCacheEntry.getObjectValue();
+                cachedDn = ( Dn ) dnCacheEntry.getObjectValue();
             }
         }
 
@@ -104,7 +104,7 @@ public class DefaultDnFactory implements
 
             if ( dnCache != null )
             {
-                dnCache.put( new Element( dn, cachedDn) );
+                dnCache.put( new Element( dn, cachedDn ) );
             }
 
             if ( enableStats )

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/ReferralManagerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/ReferralManagerImpl.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/ReferralManagerImpl.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/ReferralManagerImpl.java Tue Jan 24 14:12:39 2012
@@ -81,7 +81,8 @@ public class ReferralManagerImpl impleme
         Set<String> suffixes = nexus.listSuffixes();
         OBJECT_CLASS_AT = directoryService.getSchemaManager().getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
 
-        init( directoryService, suffixes.toArray( new String[]{} ) );
+        init( directoryService, suffixes.toArray( new String[]
+            {} ) );
 
         unlock();
     }
@@ -161,12 +162,13 @@ public class ReferralManagerImpl impleme
         CoreSession adminSession = directoryService.getAdminSession();
         PartitionNexus nexus = directoryService.getPartitionNexus();
 
-        for ( String suffix:suffixes )
+        for ( String suffix : suffixes )
         {
             // We will store each entry's Dn into the Referral tree
             Dn suffixDn = directoryService.getDnFactory().create( suffix );
 
-            SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffixDn, referralFilter, searchControl );
+            SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffixDn,
+                referralFilter, searchControl );
             searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
             EntryFilteringCursor cursor = nexus.search( searchOperationContext );
 

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/SchemaService.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/SchemaService.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/SchemaService.java Tue Jan 24 14:12:39 2012
@@ -59,7 +59,7 @@ public class SchemaService
 {
     /** cached version of the schema subentry with all attributes in it */
     private static Entry schemaSubentry;
-    
+
     /** A lock to avid concurrent generation of the SubschemaSubentry */
     private static Object schemaSubentrLock = new Object();
 
@@ -69,7 +69,7 @@ public class SchemaService
      */
     private static Attribute generateComparators( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.lookupAttributeTypeRegistry( SchemaConstants.COMPARATORS_AT ) );
 
         for ( LdapComparator<?> comparator : schemaManager.getComparatorRegistry() )
@@ -83,11 +83,11 @@ public class SchemaService
 
     private static Attribute generateNormalizers( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.NORMALIZERS_AT ) );
 
         NormalizerRegistry nr = schemaManager.getNormalizerRegistry();
-        
+
         for ( Normalizer normalizer : nr )
         {
             attr.add( SchemaUtils.render( normalizer ) );
@@ -99,14 +99,14 @@ public class SchemaService
 
     private static Attribute generateSyntaxCheckers( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.SYNTAX_CHECKERS_AT ) );
 
         for ( SyntaxChecker syntaxChecker : schemaManager.getSyntaxCheckerRegistry() )
         {
             attr.add( SchemaUtils.render( syntaxChecker ) );
         }
-        
+
         return attr;
     }
 
@@ -127,7 +127,7 @@ public class SchemaService
 
     private static Attribute generateAttributeTypes( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.ATTRIBUTE_TYPES_AT ) );
 
         for ( AttributeType attributeType : schemaManager.getAttributeTypeRegistry() )
@@ -141,7 +141,7 @@ public class SchemaService
 
     private static Attribute generateMatchingRules( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.MATCHING_RULES_AT ) );
 
         for ( MatchingRule matchingRule : schemaManager.getMatchingRuleRegistry() )
@@ -169,7 +169,7 @@ public class SchemaService
 
     private static Attribute generateSyntaxes( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.LDAP_SYNTAXES_AT ) );
 
         for ( LdapSyntax syntax : schemaManager.getLdapSyntaxRegistry() )
@@ -183,42 +183,42 @@ public class SchemaService
 
     private static Attribute generateDitContextRules( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.DIT_CONTENT_RULES_AT ) );
 
         for ( DITContentRule ditContentRule : schemaManager.getDITContentRuleRegistry() )
         {
             attr.add( SchemaUtils.render( ditContentRule ).toString() );
         }
-        
+
         return attr;
     }
 
 
     private static Attribute generateDitStructureRules( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.DIT_STRUCTURE_RULES_AT ) );
 
         for ( DITStructureRule ditStructureRule : schemaManager.getDITStructureRuleRegistry() )
         {
             attr.add( SchemaUtils.render( ditStructureRule ).toString() );
         }
-        
+
         return attr;
     }
 
 
     private static Attribute generateNameForms( SchemaManager schemaManager ) throws LdapException
     {
-        Attribute attr = new DefaultAttribute( 
+        Attribute attr = new DefaultAttribute(
             schemaManager.getAttributeType( SchemaConstants.NAME_FORMS_AT ) );
 
         for ( NameForm nameForm : schemaManager.getNameFormRegistry() )
         {
             attr.add( SchemaUtils.render( nameForm ).toString() );
         }
-        
+
         return attr;
     }
 
@@ -231,7 +231,7 @@ public class SchemaService
         Entry attrs = new DefaultEntry( schemaManager, mods.getDn() );
 
         // add the objectClass attribute : 'top', 'subschema', 'subentry' and 'apacheSubschema' 
-        attrs.put( SchemaConstants.OBJECT_CLASS_AT, 
+        attrs.put( SchemaConstants.OBJECT_CLASS_AT,
             SchemaConstants.TOP_OC,
             SchemaConstants.SUBSCHEMA_OC,
             SchemaConstants.SUBENTRY_OC,
@@ -303,20 +303,20 @@ public class SchemaService
         {
             if ( schemaSubentry == null )
             {
-                Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(), 
+                Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(),
                     SchemaConstants.SCHEMA_MODIFICATIONS_DN );
 
-                generateSchemaSubentry( 
-                    directoryService.getSchemaManager(), 
+                generateSchemaSubentry(
+                    directoryService.getSchemaManager(),
                     directoryService.getSchemaPartition().lookup(
-                        new LookupOperationContext( null, schemaModificationAttributesDn) ) );
+                        new LookupOperationContext( null, schemaModificationAttributesDn ) ) );
             }
-    
+
             return ( Entry ) schemaSubentry.clone();
         }
     }
-    
-    
+
+
     /* (non-Javadoc)
      * @see org.apache.directory.server.core.schema.SchemaService#getSubschemaEntryCloned()
      */
@@ -324,13 +324,13 @@ public class SchemaService
     {
         if ( schemaSubentry == null )
         {
-            Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(), 
+            Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(),
                 SchemaConstants.SCHEMA_MODIFICATIONS_DN );
 
-            generateSchemaSubentry( 
-                directoryService.getSchemaManager(), 
+            generateSchemaSubentry(
+                directoryService.getSchemaManager(),
                 directoryService.getSchemaPartition().lookup(
-                    new LookupOperationContext( null, schemaModificationAttributesDn) ) );
+                    new LookupOperationContext( null, schemaModificationAttributesDn ) ) );
         }
 
         return ( Entry ) schemaSubentry.clone();
@@ -346,62 +346,63 @@ public class SchemaService
         {
             ids = StringConstants.EMPTY_STRINGS;
         }
-        
+
         SchemaManager schemaManager = directoryService.getSchemaManager();
 
         Set<String> setOids = new HashSet<String>();
         Entry attrs = new DefaultEntry( schemaManager, Dn.ROOT_DSE );
         boolean returnAllOperationalAttributes = false;
 
-        synchronized( schemaSubentrLock )
+        synchronized ( schemaSubentrLock )
         {
             // ---------------------------------------------------------------
             // Check if we need an update by looking at timestamps on disk
             // ---------------------------------------------------------------
-            Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(), 
+            Dn schemaModificationAttributesDn = new Dn( directoryService.getSchemaManager(),
                 SchemaConstants.SCHEMA_MODIFICATIONS_DN );
 
-            Entry mods = 
-                directoryService.getSchemaPartition().lookup( 
-                    new LookupOperationContext( null, schemaModificationAttributesDn, SchemaConstants.ALL_ATTRIBUTES_ARRAY ) );
-            
-// @todo enable this optimization at some point but for now it
-// is causing some problems so I will just turn it off
-//          Attribute modifyTimeDisk = mods.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
-//
-//          Attribute modifyTimeMemory = null;
-//
-//            if ( schemaSubentry != null )
-//            {
-//                modifyTimeMemory = schemaSubentry.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
-//                if ( modifyTimeDisk == null && modifyTimeMemory == null )
-//                {
-//                    // do nothing!
-//                }
-//                else if ( modifyTimeDisk != null && modifyTimeMemory != null )
-//                {
-//                    Date disk = DateUtils.getDate( ( String ) modifyTimeDisk.get() );
-//                    Date mem = DateUtils.getDate( ( String ) modifyTimeMemory.get() );
-//                    if ( disk.after( mem ) )
-//                    {
-//                        generateSchemaSubentry( mods );
-//                    }
-//                }
-//                else
-//                {
-//                    generateSchemaSubentry( mods );
-//                }
-//            }
-//            else
-//            {
-                generateSchemaSubentry( schemaManager, mods );
-//            }
+            Entry mods =
+                directoryService.getSchemaPartition().lookup(
+                    new LookupOperationContext( null, schemaModificationAttributesDn,
+                        SchemaConstants.ALL_ATTRIBUTES_ARRAY ) );
+
+            // @todo enable this optimization at some point but for now it
+            // is causing some problems so I will just turn it off
+            //          Attribute modifyTimeDisk = mods.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
+            //
+            //          Attribute modifyTimeMemory = null;
+            //
+            //            if ( schemaSubentry != null )
+            //            {
+            //                modifyTimeMemory = schemaSubentry.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
+            //                if ( modifyTimeDisk == null && modifyTimeMemory == null )
+            //                {
+            //                    // do nothing!
+            //                }
+            //                else if ( modifyTimeDisk != null && modifyTimeMemory != null )
+            //                {
+            //                    Date disk = DateUtils.getDate( ( String ) modifyTimeDisk.get() );
+            //                    Date mem = DateUtils.getDate( ( String ) modifyTimeMemory.get() );
+            //                    if ( disk.after( mem ) )
+            //                    {
+            //                        generateSchemaSubentry( mods );
+            //                    }
+            //                }
+            //                else
+            //                {
+            //                    generateSchemaSubentry( mods );
+            //                }
+            //            }
+            //            else
+            //            {
+            generateSchemaSubentry( schemaManager, mods );
+            //            }
 
             // ---------------------------------------------------------------
             // Prep Work: Transform the attributes to their OID counterpart
             // ---------------------------------------------------------------
 
-            for ( String id:ids )
+            for ( String id : ids )
             {
                 // Check whether the set contains a plus, and use it below to include all
                 // operational attributes.  Due to RFC 3673, and issue DIREVE-228 in JIRA
@@ -409,7 +410,7 @@ public class SchemaService
                 {
                     returnAllOperationalAttributes = true;
                 }
-                else if ( SchemaConstants.ALL_USER_ATTRIBUTES.equals(  id ) )
+                else if ( SchemaConstants.ALL_USER_ATTRIBUTES.equals( id ) )
                 {
                     setOids.add( id );
                 }
@@ -480,7 +481,7 @@ public class SchemaService
             }
 
             int minSetSize = 0;
-            
+
             if ( setOids.contains( SchemaConstants.ALL_OPERATIONAL_ATTRIBUTES ) )
             {
                 minSetSize++;
@@ -498,16 +499,16 @@ public class SchemaService
 
             // add the objectClass attribute
             if ( setOids.contains( SchemaConstants.ALL_USER_ATTRIBUTES ) ||
-                 setOids.contains( SchemaConstants.OBJECT_CLASS_AT_OID ) ||
-                 setOids.size() == minSetSize )
+                setOids.contains( SchemaConstants.OBJECT_CLASS_AT_OID ) ||
+                setOids.size() == minSetSize )
             {
                 addAttribute( attrs, SchemaConstants.OBJECT_CLASS_AT );
             }
 
             // add the cn attribute as required for the Rdn
             if ( setOids.contains( SchemaConstants.ALL_USER_ATTRIBUTES ) ||
-                 setOids.contains( SchemaConstants.CN_AT_OID ) ||
-                 setOids.size() == minSetSize )
+                setOids.contains( SchemaConstants.CN_AT_OID ) ||
+                setOids.size() == minSetSize )
             {
                 addAttribute( attrs, SchemaConstants.CN_AT );
             }
@@ -516,7 +517,6 @@ public class SchemaService
             // set standard operational attributes for the subentry
             // -------------------------------------------------------------------
 
-
             if ( returnAllOperationalAttributes || setOids.contains( SchemaConstants.CREATE_TIMESTAMP_AT_OID ) )
             {
                 addAttribute( attrs, SchemaConstants.CREATE_TIMESTAMP_AT );

Modified: directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java (original)
+++ directory/apacheds/trunk/core-shared/src/main/java/org/apache/directory/server/core/shared/partition/DefaultPartitionNexus.java Tue Jan 24 14:12:39 2012
@@ -107,7 +107,7 @@ public class DefaultPartitionNexus exten
 
     /** the fixed id: 'NEXUS' */
     private static final String ID = "NEXUS";
-    
+
     /** Speedup for logs */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
@@ -138,12 +138,11 @@ public class DefaultPartitionNexus exten
     private final List<Modification> mods = new ArrayList<Modification>( 2 );
 
     private String lastSyncedCtxCsn = null;
-    
+
     /** The cn=schema Dn */
     private Dn subschemSubentryDn;
 
 
-
     /**
      * Creates the root nexus singleton of the entire system.  The root DSE has
      * several attributes that are injected into it besides those that may
@@ -158,7 +157,7 @@ public class DefaultPartitionNexus exten
     {
         id = ID;
         suffixDn = null;
-            
+
         // setup that root DSE
         this.rootDse = rootDse;
 
@@ -186,7 +185,7 @@ public class DefaultPartitionNexus exten
         }
 
         rootDse.put( SchemaConstants.VENDOR_VERSION_AT, props.getProperty( "apacheds.version", "UNKNOWN" ) );
-        
+
         // The rootDSE uuid has been randomly created
         rootDse.put( SchemaConstants.ENTRY_UUID_AT, "f290425c-8272-4e62-8a67-92b06f38dbf5" );
     }
@@ -202,30 +201,30 @@ public class DefaultPartitionNexus exten
         {
             // Add the supported controls
             Iterator<String> ctrlOidItr = directoryService.getLdapCodecService().registeredControls();
-            
+
             while ( ctrlOidItr.hasNext() )
             {
                 rootDse.add( SchemaConstants.SUPPORTED_CONTROL_AT, ctrlOidItr.next() );
             }
-    
+
             schemaManager = directoryService.getSchemaManager();
             ENTRY_CSN_AT = schemaManager.getAttributeType( SchemaConstants.ENTRY_CSN_AT );
             OBJECT_CLASS_AT = schemaManager.getAttributeType( SchemaConstants.OBJECT_CLASS_AT );
-    
+
             // Initialize and normalize the localy used DNs
             Dn adminDn = directoryService.getDnFactory().create( ServerDNConstants.ADMIN_SYSTEM_DN );
             adminDn.apply( schemaManager );
-    
+
             Value<?> attr = rootDse.get( SchemaConstants.SUBSCHEMA_SUBENTRY_AT ).get();
             subschemSubentryDn = directoryService.getDnFactory().create( attr.getString() );
-    
+
             //initializeSystemPartition( directoryService );
-    
+
             List<Partition> initializedPartitions = new ArrayList<Partition>();
-            
+
             initializedPartitions.add( 0, directoryService.getSystemPartition() );
             addContextPartition( directoryService.getSystemPartition() );
-    
+
             try
             {
                 for ( Partition partition : directoryService.getPartitions() )
@@ -233,9 +232,9 @@ public class DefaultPartitionNexus exten
                     addContextPartition( partition );
                     initializedPartitions.add( partition );
                 }
-    
+
                 createContextCsnModList();
-    
+
                 initialized = true;
             }
             finally
@@ -243,12 +242,12 @@ public class DefaultPartitionNexus exten
                 if ( !initialized )
                 {
                     Iterator<Partition> i = initializedPartitions.iterator();
-                    
+
                     while ( i.hasNext() )
                     {
                         Partition partition = i.next();
                         i.remove();
-                        
+
                         try
                         {
                             partition.destroy();
@@ -280,11 +279,11 @@ public class DefaultPartitionNexus exten
         if ( !system.hasEntry( new HasEntryOperationContext( adminSession, systemSuffixDn ) ) )
         {
             Entry systemEntry = new DefaultEntry( schemaManager, systemSuffixDn );
-            
+
             // Add the ObjectClasses
             systemEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
                 SchemaConstants.ORGANIZATIONAL_UNIT_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC );
-            
+
             // Add some operational attributes
             systemEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN );
             systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
@@ -292,7 +291,7 @@ public class DefaultPartitionNexus exten
             systemEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
             systemEntry.put( DnUtils.getRdnAttributeType( ServerDNConstants.SYSTEM_DN ), DnUtils
                 .getRdnValue( ServerDNConstants.SYSTEM_DN ) );
-            
+
             AddOperationContext addOperationContext = new AddOperationContext( adminSession, systemEntry );
             system.add( addOperationContext );
         }
@@ -342,7 +341,7 @@ public class DefaultPartitionNexus exten
         {
             try
             {
-                removeContextPartition(  directoryService.getDnFactory().create( suffix ) );
+                removeContextPartition( directoryService.getDnFactory().create( suffix ) );
             }
             catch ( Exception e )
             {
@@ -527,7 +526,7 @@ public class DefaultPartitionNexus exten
         }
 
         Partition partition = getPartition( dn );
-        
+
         return partition.hasEntry( hasEntryContext );
     }
 
@@ -538,7 +537,7 @@ public class DefaultPartitionNexus exten
     public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         Partition partition = getPartition( listContext.getDn() );
-        
+
         return partition.list( listContext );
     }
 
@@ -559,9 +558,9 @@ public class DefaultPartitionNexus exten
         if ( dn.size() == 0 )
         {
             Entry retval = new ClonedServerEntry( rootDse );
-            
+
             return retval;
-            
+
             /*
             if ( ( lookupContext.getAttrsId() != null ) && !lookupContext.getAttrsId().isEmpty() )
             {
@@ -586,8 +585,8 @@ public class DefaultPartitionNexus exten
         }
 
         Partition partition = getPartition( dn );
-        Entry entry =  partition.lookup( lookupContext );
-        
+        Entry entry = partition.lookup( lookupContext );
+
         if ( entry == null )
         {
             LdapNoSuchObjectException e = new LdapNoSuchObjectException( "Attempt to lookup non-existant entry: "
@@ -614,9 +613,9 @@ public class DefaultPartitionNexus exten
         Partition partition = getPartition( modifyContext.getDn() );
 
         partition.modify( modifyContext );
-        
+
         Entry alteredEntry = modifyContext.getAlteredEntry();
-        
+
         if ( alteredEntry != null )
         {
             directoryService.setContextCsn( alteredEntry.get( ENTRY_CSN_AT ).getString() );
@@ -766,7 +765,7 @@ public class DefaultPartitionNexus exten
             boolean isSearchAll = false;
 
             // We have to be careful, as we may have a filter which is not a PresenceFilter
-            if ( filter instanceof PresenceNode)
+            if ( filter instanceof PresenceNode )
             {
                 isSearchAll = ( ( PresenceNode ) filter ).getAttributeType().equals( OBJECT_CLASS_AT );
             }
@@ -790,10 +789,11 @@ public class DefaultPartitionNexus exten
                 for ( Partition partition : partitions.values() )
                 {
                     Dn contextDn = partition.getSuffixDn();
-                    HasEntryOperationContext hasEntryContext = new HasEntryOperationContext( searchContext.getSession(), contextDn );
-                    
+                    HasEntryOperationContext hasEntryContext = new HasEntryOperationContext(
+                        searchContext.getSession(), contextDn );
+
                     // search only if the context entry exists
-                    if( partition.hasEntry( hasEntryContext ) )
+                    if ( partition.hasEntry( hasEntryContext ) )
                     {
                         searchContext.setDn( contextDn );
                         searchContext.setScope( SearchScope.OBJECT );
@@ -948,7 +948,7 @@ public class DefaultPartitionNexus exten
         {
             partitionLookupTree.remove( partition.getSuffixDn() );
         }
-        
+
         partitions.remove( key );
 
         try
@@ -968,7 +968,7 @@ public class DefaultPartitionNexus exten
     public Partition getPartition( Dn dn ) throws LdapException
     {
         Partition parent = null;
-        
+
         synchronized ( partitionLookupTree )
         {
             parent = partitionLookupTree.getElement( dn );
@@ -1013,7 +1013,7 @@ public class DefaultPartitionNexus exten
 
         if ( supportedExtension == null )
         {
-            rootDse.put( SchemaConstants.SUPPORTED_EXTENSION_AT, (String)null );
+            rootDse.put( SchemaConstants.SUPPORTED_EXTENSION_AT, ( String ) null );
             supportedExtension = rootDse.get( SchemaConstants.SUPPORTED_EXTENSION_AT );
         }
 
@@ -1031,13 +1031,14 @@ public class DefaultPartitionNexus exten
     {
         Attribute supportedSaslMechanismsAt = null;
 
-        supportedSaslMechanismsAt = new DefaultAttribute( schemaManager.lookupAttributeTypeRegistry( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT ) );
+        supportedSaslMechanismsAt = new DefaultAttribute(
+            schemaManager.lookupAttributeTypeRegistry( SchemaConstants.SUPPORTED_SASL_MECHANISMS_AT ) );
 
         for ( String saslMechanism : supportedSaslMechanisms )
         {
             supportedSaslMechanismsAt.add( saslMechanism );
         }
-        
+
         rootDse.add( supportedSaslMechanismsAt );
     }
 

Modified: directory/apacheds/trunk/http-directory-bridge/src/main/java/org/apache/directory/server/bridge/http/HttpDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/http-directory-bridge/src/main/java/org/apache/directory/server/bridge/http/HttpDirectoryService.java?rev=1235259&r1=1235258&r2=1235259&view=diff
==============================================================================
--- directory/apacheds/trunk/http-directory-bridge/src/main/java/org/apache/directory/server/bridge/http/HttpDirectoryService.java (original)
+++ directory/apacheds/trunk/http-directory-bridge/src/main/java/org/apache/directory/server/bridge/http/HttpDirectoryService.java Tue Jan 24 14:12:39 2012
@@ -88,7 +88,7 @@ public class HttpDirectoryService
 
             LdapResult result = resp.getLdapResult();
             result.setDiagnosticMessage( e.getMessage() );
-            result.setResultCode( ResultCodeEnum.getResultCode(e) );
+            result.setResultCode( ResultCodeEnum.getResultCode( e ) );
 
             holder = new BindResponseHolder( resp, null );
         }



Mime
View raw message