directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235334 [4/6] - in /directory/apacheds/trunk: ldap-client-test/src/test/java/org/apache/directory/shared/client/api/ ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ ldap-client-test/src/test/java/org/apach...
Date Tue, 24 Jan 2012 16:27:22 GMT
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/log/impl/LogManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/log/impl/LogManager.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/log/impl/LogManager.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/log/impl/LogManager.java Tue Jan 24 16:27:18 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.log.impl;
 
+
 import java.nio.ByteBuffer;
 
 import java.util.concurrent.locks.ReentrantLock;
@@ -35,57 +36,59 @@ import org.apache.directory.server.log.L
 import org.apache.directory.server.log.LogScanner;
 import org.apache.directory.server.log.UserLogRecord;
 
+
 class LogManager
 {
-   
+
     /**  Controlfile record size */
     private final static int CONTROLFILE_RECORD_SIZE = 36;
-    
+
     /** Controlfile file magic number */
     private final static int CONTROLFILE_MAGIC_NUMBER = 0xFF11FF11;
-    
+
     /** Controlfile log file number */
     private final static long CONTROLFILE_LOG_FILE_NUMBER = -1;
-    
+
     /** Shadow Controlfile log file number */
     private final static long CONTROLFILE_SHADOW_LOG_FILE_NUMBER = -2;
-    
+
     /** buffer used to do IO on controlfile */
     byte controlFileBuffer[] = new byte[CONTROLFILE_RECORD_SIZE];
-    
+
     /** ByteBuffer used to to IO on checkpoint file */
     ByteBuffer controlFileMarker = ByteBuffer.wrap( controlFileBuffer );
-    
+
     /** Current checkpoint record in memory */
     ControlFileRecord controlFileRecord = new ControlFileRecord();
-    
+
     /** Min neeeded point in the log */
     LogAnchor minLogAnchor = new LogAnchor();
-    
+
     /** Protects minLogAchor */
     Lock minLogAnchorLock = new ReentrantLock();
-    
+
     /** Log file manager */
     LogFileManager logFileManager;
-        
+
     /** Log Anchor comparator */
     LogAnchorComparator anchorComparator = new LogAnchorComparator();
-    
+
     /** Current log file */
     private long currentLogFileNumber;
-    
+
     /** Buffer used to read log file markers */
     byte markerBuffer[] = new byte[LogFileRecords.LOG_FILE_HEADER_SIZE];
-    
+
     /** ByteBuffer wrapper for the marker buffer */
     ByteBuffer markerHead = ByteBuffer.wrap( markerBuffer );
-    
-    
+
+
     public LogManager( LogFileManager logFileManager )
     {
         this.logFileManager = logFileManager;
     }
-    
+
+
     /**
      *Initializes the log management:
      * 1) Checks if control file exists and creates it if necesssary. If it exists, it reads it and loads the latest checkpoint.
@@ -99,35 +102,33 @@ class LogManager
     {
         LogAnchor scanPoint = new LogAnchor();
         LogScanner scanner;
-        UserLogRecord logRecord;        
+        UserLogRecord logRecord;
         LogFileManager.LogFileReader reader;
 
-        
-        
         // Read and verify control file
         boolean controlFileExists = true;
         try
         {
             this.readControlFile();
         }
-        catch( FileNotFoundException e )
+        catch ( FileNotFoundException e )
         {
             controlFileExists = false;
         }
-        
+
         if ( controlFileExists )
         {
             boolean invalidLog = false;
-            
+
             // Set the min log anchor from the control file
-            minLogAnchor.resetLogAnchor( controlFileRecord.minNeededLogFile, 
-                    controlFileRecord.minNeededLogFileOffset, controlFileRecord.minNeededLSN );
-            
+            minLogAnchor.resetLogAnchor( controlFileRecord.minNeededLogFile,
+                controlFileRecord.minNeededLogFileOffset, controlFileRecord.minNeededLSN );
+
             scanPoint.resetLogAnchor( minLogAnchor );
-            
+
             logRecord = new UserLogRecord();
             scanner = new DefaultLogScanner( scanPoint, logFileManager );
-            
+
             try
             {
                 while ( scanner.getNextRecord( logRecord ) )
@@ -135,7 +136,7 @@ class LogManager
                     // No need to do anything with the log record
                 }
             }
-            catch( InvalidLogException e )
+            catch ( InvalidLogException e )
             {
                 invalidLog = true;
             }
@@ -143,25 +144,25 @@ class LogManager
             {
                 scanner.close();
             }
-            
+
             long lastGoodLogFileNumber = scanner.getLastGoodFileNumber();
             long lastGoodLogFileOffset = scanner.getLastGoodOffset();
             currentLogFileNumber = lastGoodLogFileNumber;
-            
-            if ( ( lastGoodLogFileNumber < LogAnchor.MIN_LOG_NUMBER ) || 
-                ( lastGoodLogFileOffset < LogAnchor.MIN_LOG_OFFSET ))
+
+            if ( ( lastGoodLogFileNumber < LogAnchor.MIN_LOG_NUMBER ) ||
+                ( lastGoodLogFileOffset < LogAnchor.MIN_LOG_OFFSET ) )
             {
                 throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
             }
-            
-            scanPoint.resetLogAnchor( lastGoodLogFileNumber, lastGoodLogFileOffset, 
-                    LogAnchor.UNKNOWN_LSN );
-            
+
+            scanPoint.resetLogAnchor( lastGoodLogFileNumber, lastGoodLogFileOffset,
+                LogAnchor.UNKNOWN_LSN );
+
             if ( anchorComparator.compare( scanPoint, minLogAnchor ) < 0 )
             {
                 throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
             }
-            
+
             /*
              * If invalid content at the end of file:
              * if we are past the header of file, then
@@ -178,7 +179,7 @@ class LogManager
                 try
                 {
                     reader = logFileManager.getReaderForLogFile( ( lastGoodLogFileNumber + 1 ) );
-                    
+
                 }
                 catch ( FileNotFoundException e )
                 {
@@ -191,23 +192,23 @@ class LogManager
                         reader.close();
                     }
                 }
-                
+
                 if ( reader != null )
                 {
                     throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
                 }
-                
-                if  ( lastGoodLogFileOffset >= LogFileRecords.LOG_FILE_HEADER_SIZE  )
+
+                if ( lastGoodLogFileOffset >= LogFileRecords.LOG_FILE_HEADER_SIZE )
                 {
                     logFileManager.truncateLogFile( lastGoodLogFileNumber, lastGoodLogFileOffset );
                 }
                 else
                 {
                     // Reformat the existing log file
-                    this.createNextLogFile( true);
-                }           
+                    this.createNextLogFile( true );
+                }
             }
-            
+
         }
         {
             /*
@@ -215,42 +216,42 @@ class LogManager
              * maybe we crashed in the middle of creating the first log file. 
              * We  should have the min log file at most with the file header formatted. 
              */
-           reader = null;
-           boolean fileExists = false;
-           currentLogFileNumber = LogAnchor.MIN_LOG_NUMBER;
-           try
-           {
-               reader = logFileManager.getReaderForLogFile( LogAnchor.MIN_LOG_NUMBER );
-               
-               if ( reader.getLength() > LogFileRecords.LOG_FILE_HEADER_SIZE )
-               {
-                   throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
-               }
-               fileExists = true;
-           }
-           catch ( FileNotFoundException e )
-           {
-               // Fine, we will create the file
-           }
-           finally
-           {
-               if ( reader != null )
-               {
-                   reader.close();
-               }
-           }
-            
-           
-           
-           this.createNextLogFile( fileExists );
-            
+            reader = null;
+            boolean fileExists = false;
+            currentLogFileNumber = LogAnchor.MIN_LOG_NUMBER;
+            try
+            {
+                reader = logFileManager.getReaderForLogFile( LogAnchor.MIN_LOG_NUMBER );
+
+                if ( reader.getLength() > LogFileRecords.LOG_FILE_HEADER_SIZE )
+                {
+                    throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
+                }
+                fileExists = true;
+            }
+            catch ( FileNotFoundException e )
+            {
+                // Fine, we will create the file
+            }
+            finally
+            {
+                if ( reader != null )
+                {
+                    reader.close();
+                }
+            }
+
+            this.createNextLogFile( fileExists );
+
             // Prepare the min log anchor and control file and write the control file
-           minLogAnchor.resetLogAnchor( LogAnchor.MIN_LOG_NUMBER, LogFileRecords.LOG_FILE_HEADER_SIZE, LogAnchor.UNKNOWN_LSN );
-           
-           this.writeControlFile();
+            minLogAnchor.resetLogAnchor( LogAnchor.MIN_LOG_NUMBER, LogFileRecords.LOG_FILE_HEADER_SIZE,
+                LogAnchor.UNKNOWN_LSN );
+
+            this.writeControlFile();
         }
     }
-    
+
+
     /**
      * Called by LogFlushManager to switch to the next file.
      *
@@ -262,7 +263,8 @@ class LogManager
      * @throws IOException
      * @throws InvalidLogException
      */
-    public LogFileManager.LogFileWriter switchToNextLogFile( LogFileManager.LogFileWriter currentWriter ) throws IOException, InvalidLogException
+    public LogFileManager.LogFileWriter switchToNextLogFile( LogFileManager.LogFileWriter currentWriter )
+        throws IOException, InvalidLogException
     {
         if ( currentWriter != null )
         {
@@ -270,10 +272,11 @@ class LogManager
             this.writeControlFile();
             this.createNextLogFile( false );
         }
-        
+
         return logFileManager.getWriterForLogFile( this.currentLogFileNumber );
     }
-    
+
+
     /**
      * Called when the logging subsystem is notified about the minimum position 
      * in the log files that is needed. Log manager uses this information to advance
@@ -287,17 +290,18 @@ class LogManager
         {
             return;
         }
-        
+
         minLogAnchorLock.lock();
-        
+
         if ( anchorComparator.compare( minLogAnchor, newLogAnchor ) < 0 )
         {
             minLogAnchor.resetLogAnchor( newLogAnchor );
         }
-        
+
         minLogAnchorLock.unlock();
     }
-    
+
+
     /**
      * Writes the control file. To make paritally written control files unlikely,
      * data is first written to a shadow file and then moved(renamed) to the controlfile.
@@ -311,23 +315,22 @@ class LogManager
     {
         // Copy the min log file anchor
         minLogAnchorLock.lock();
-        
+
         controlFileRecord.minNeededLogFile = minLogAnchor.getLogFileNumber();
         controlFileRecord.minNeededLogFileOffset = minLogAnchor.getLogFileOffset();
         controlFileRecord.minNeededLSN = minLogAnchor.getLogLSN();
-        
+
         minLogAnchorLock.unlock();
-        
-        if ( controlFileRecord.minNeededLogFile > controlFileRecord.minExistingLogFile  )
+
+        if ( controlFileRecord.minNeededLogFile > controlFileRecord.minExistingLogFile )
         {
-            this.deleteUnnecessaryLogFiles( controlFileRecord.minExistingLogFile,controlFileRecord.minNeededLogFile );
+            this.deleteUnnecessaryLogFiles( controlFileRecord.minExistingLogFile, controlFileRecord.minNeededLogFile );
             controlFileRecord.minExistingLogFile = controlFileRecord.minNeededLogFile;
-            
+
         }
-        
+
         // TODO compute checksum for log record here
-        
-        
+
         controlFileMarker.rewind();
         controlFileMarker.putLong( controlFileRecord.minExistingLogFile );
         controlFileMarker.putLong( controlFileRecord.minNeededLogFile );
@@ -335,33 +338,33 @@ class LogManager
         controlFileMarker.putLong( controlFileRecord.minNeededLSN );
         controlFileMarker.putLong( controlFileRecord.checksum );
         controlFileMarker.putInt( CONTROLFILE_MAGIC_NUMBER );
-        
-        
-        boolean shadowFileExists = logFileManager.createLogFile( CONTROLFILE_SHADOW_LOG_FILE_NUMBER  );
-        
+
+        boolean shadowFileExists = logFileManager.createLogFile( CONTROLFILE_SHADOW_LOG_FILE_NUMBER );
+
         if ( shadowFileExists )
         {
             logFileManager.truncateLogFile( CONTROLFILE_SHADOW_LOG_FILE_NUMBER, 0 );
         }
-        
-        LogFileManager.LogFileWriter controlFileWriter = logFileManager.getWriterForLogFile( CONTROLFILE_SHADOW_LOG_FILE_NUMBER );
-        
+
+        LogFileManager.LogFileWriter controlFileWriter = logFileManager
+            .getWriterForLogFile( CONTROLFILE_SHADOW_LOG_FILE_NUMBER );
+
         try
         {
-            controlFileWriter.append( controlFileBuffer, 0, CONTROLFILE_RECORD_SIZE);
+            controlFileWriter.append( controlFileBuffer, 0, CONTROLFILE_RECORD_SIZE );
             controlFileWriter.sync();
         }
         finally
         {
             controlFileWriter.close();
         }
-        
+
         // Do the move now
-        logFileManager.rename( CONTROLFILE_SHADOW_LOG_FILE_NUMBER , CONTROLFILE_LOG_FILE_NUMBER );
-        
-        
+        logFileManager.rename( CONTROLFILE_SHADOW_LOG_FILE_NUMBER, CONTROLFILE_LOG_FILE_NUMBER );
+
     }
-    
+
+
     /**
      * Read and verifies the control file.
      *
@@ -372,21 +375,22 @@ class LogManager
     private void readControlFile() throws IOException, InvalidLogException, FileNotFoundException
     {
         boolean invalidControlFile = false;
-        LogFileManager.LogFileReader controlFileReader = logFileManager.getReaderForLogFile( CONTROLFILE_LOG_FILE_NUMBER );
-        
+        LogFileManager.LogFileReader controlFileReader = logFileManager
+            .getReaderForLogFile( CONTROLFILE_LOG_FILE_NUMBER );
+
         try
         {
             controlFileReader.read( controlFileBuffer, 0, CONTROLFILE_RECORD_SIZE );
         }
-        catch( EOFException e )
+        catch ( EOFException e )
         {
-            throw new InvalidLogException( I18n.err( I18n.ERR_750 ) , e);
+            throw new InvalidLogException( I18n.err( I18n.ERR_750 ), e );
         }
         finally
         {
             controlFileReader.close();
         }
-        
+
         controlFileMarker.rewind();
         controlFileRecord.minExistingLogFile = controlFileMarker.getLong();
         controlFileRecord.minNeededLogFile = controlFileMarker.getLong();
@@ -394,38 +398,38 @@ class LogManager
         controlFileRecord.minNeededLSN = controlFileMarker.getLong();
         controlFileRecord.checksum = controlFileMarker.getLong();
         int magicNumber = controlFileMarker.getInt();
-        
-        
+
         if ( controlFileRecord.minExistingLogFile < LogAnchor.MIN_LOG_NUMBER )
         {
             invalidControlFile = true;
         }
-        
-        if ( (controlFileRecord.minNeededLogFile < LogAnchor.MIN_LOG_NUMBER ) ||
-              ( controlFileRecord.minNeededLogFileOffset < LogAnchor.MIN_LOG_OFFSET ) )
+
+        if ( ( controlFileRecord.minNeededLogFile < LogAnchor.MIN_LOG_NUMBER ) ||
+            ( controlFileRecord.minNeededLogFileOffset < LogAnchor.MIN_LOG_OFFSET ) )
         {
             invalidControlFile = true;
         }
-        
+
         if ( controlFileRecord.minExistingLogFile > controlFileRecord.minNeededLogFile )
         {
             invalidControlFile = true;
         }
-        
+
         if ( magicNumber != this.CONTROLFILE_MAGIC_NUMBER )
         {
             invalidControlFile = true;
         }
-        
+
         // TODO compute and compare checksum
-        
+
         if ( invalidControlFile == true )
         {
             throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
         }
-        
+
     }
-    
+
+
     /**
      * Creates the next log file. If the log file already exists, then it is reformatted, that is,
      * its size is truncated to zero and file header is writtten again.
@@ -437,83 +441,81 @@ class LogManager
     private void createNextLogFile( boolean reformatExistingFile ) throws IOException, InvalidLogException
     {
         LogFileManager.LogFileWriter writer = null;
-            
+
         long logFileNumber = this.currentLogFileNumber;
-        
+
         if ( reformatExistingFile == false )
         {
             logFileNumber++;
         }
-        
+
         // Try to create the file.
         boolean fileAlreadyExists = logFileManager.createLogFile( logFileNumber );
-        
+
         if ( ( reformatExistingFile == false ) && ( fileAlreadyExists == true ) )
         {
             // Didnt expect the file to be around
             throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
         }
-        
+
         if ( ( reformatExistingFile == true ) && ( fileAlreadyExists == false ) )
         {
             // Didnt expect the file to be around
             throw new InvalidLogException( I18n.err( I18n.ERR_750 ) );
         }
-        
+
         if ( reformatExistingFile )
         {
             logFileManager.truncateLogFile( logFileNumber, LogAnchor.MIN_LOG_OFFSET );
-           
+
         }
-        
+
         writer = logFileManager.getWriterForLogFile( logFileNumber );
-        
+
         try
         {
             markerHead.rewind();
             markerHead.putLong( logFileNumber );
             markerHead.putInt( LogFileRecords.LOG_FILE_HEADER_MAGIC_NUMBER );
             writer.append( markerBuffer, 0, LogFileRecords.LOG_FILE_HEADER_SIZE );
-            writer.sync();            
+            writer.sync();
         }
         finally
         {
             writer.close();
         }
-        
+
         this.currentLogFileNumber = logFileNumber;
-        
+
     }
-    
+
+
     private void deleteUnnecessaryLogFiles( long startingLogFileNumber, long endingLogFileNumber )
     {
-        for ( long logFileNumber = startingLogFileNumber; logFileNumber < endingLogFileNumber; 
-                logFileNumber++ )
+        for ( long logFileNumber = startingLogFileNumber; logFileNumber < endingLogFileNumber; logFileNumber++ )
         {
             try
             {
-            // Do a best effort delete
-            logFileManager.deleteLogFile( logFileNumber );
+                // Do a best effort delete
+                logFileManager.deleteLogFile( logFileNumber );
             }
-            catch( IOException e )
+            catch ( IOException e )
             {
                 // Do a best effort ...
             }
         }
     }
-    
+
     /**
      * Checkpoint record
      */
-     private class ControlFileRecord
-     {
-         long minExistingLogFile;
-         long minNeededLogFile;
-         long minNeededLogFileOffset;
-         long minNeededLSN;
-         long checksum;
-     }
-     
-    
-      
+    private class ControlFileRecord
+    {
+        long minExistingLogFile;
+        long minNeededLogFile;
+        long minNeededLogFileOffset;
+        long minNeededLSN;
+        long checksum;
+    }
+
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndex.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndex.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndex.java Tue Jan 24 16:27:18 2012
@@ -32,9 +32,9 @@ import org.apache.directory.shared.ldap.
  */
 public abstract class AbstractIndex<K, O, ID> implements Index<K, O, ID>
 {
-    /** The attribute identifier for this index */ 
+    /** The attribute identifier for this index */
     protected String attributeId;
-    
+
     /** the attribute type resolved for this JdbmIndex */
     protected AttributeType attributeType;
 
@@ -44,6 +44,7 @@ public abstract class AbstractIndex<K, O
     /** whether or not this index has been initialized */
     protected boolean initialized;
 
+
     /**
      * Creates a new instance of AbstractIndex.
      * 
@@ -53,7 +54,7 @@ public abstract class AbstractIndex<K, O
     {
     }
 
-    
+
     /**
      * Creates a new instance of AbstractIndex.
      * 
@@ -94,8 +95,8 @@ public abstract class AbstractIndex<K, O
     {
         return !attributeType.isSingleValued();
     }
-    
-    
+
+
     /**
      * Gets the size of the index cache in terms of the number of index entries to be cached.
      *
@@ -117,8 +118,8 @@ public abstract class AbstractIndex<K, O
         protect( "cacheSize" );
         this.cacheSize = cacheSize;
     }
-    
-    
+
+
     /**
      * Protects configuration properties from being set after initialization.
      *

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java Tue Jan 24 16:27:18 2012
@@ -32,7 +32,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractIndexCursor<V, Entry, ID> extends AbstractCursor<IndexEntry<V, ID>> implements IndexCursor<V, Entry, ID>
+public abstract class AbstractIndexCursor<V, Entry, ID> extends AbstractCursor<IndexEntry<V, ID>> implements
+    IndexCursor<V, Entry, ID>
 {
     /** Tells if there are some element available in the cursor */
     private boolean available = false;
@@ -40,6 +41,7 @@ public abstract class AbstractIndexCurso
     /** The message used for unsupported operations */
     protected static final String UNSUPPORTED_MSG = "Unsupported operation";
 
+
     /**
      * {@inheritDoc}
      */
@@ -47,8 +49,8 @@ public abstract class AbstractIndexCurso
     {
         return available;
     }
-    
-    
+
+
     /**
      * Gets the message to return for operations that are not supported
      * 
@@ -74,7 +76,7 @@ public abstract class AbstractIndexCurso
         throw new UnsupportedOperationException( getUnsupportedMessage() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexEntry.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexEntry.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexEntry.java Tue Jan 24 16:27:18 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.xdbm;
 
+
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 
@@ -35,6 +36,7 @@ public abstract class AbstractIndexEntry
     /** The referenced Entry if loaded from the store */
     private Entry entry;
 
+
     /**
      * Creates an instance of AbstractIndexEntry
      * 
@@ -44,32 +46,32 @@ public abstract class AbstractIndexEntry
     {
         this.entry = entry;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public abstract V getValue();
 
-    
+
     /**
      * {@inheritDoc}
      */
     public abstract void setValue( V value );
 
-    
+
     /**
      * {@inheritDoc}
      */
     public abstract ID getId();
 
-    
+
     /**
      * {@inheritDoc}
      */
     public abstract void setId( ID id );
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -78,13 +80,13 @@ public abstract class AbstractIndexEntry
         return entry;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public abstract Tuple<?, ?> getTuple();
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -93,7 +95,7 @@ public abstract class AbstractIndexEntry
         this.entry = entry;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -102,7 +104,7 @@ public abstract class AbstractIndexEntry
         entry = null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractTable.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractTable.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractTable.java Tue Jan 24 16:27:18 2012
@@ -19,12 +19,14 @@
  */
 package org.apache.directory.server.xdbm;
 
+
 import java.io.IOException;
 import java.util.Comparator;
 
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 
+
 /**
  * A Abstract Table implementation aggregating the methods comon with all the 
  * different Table implementation.
@@ -33,14 +35,14 @@ import org.apache.directory.shared.ldap.
  * @param <V> The stored value
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractTable<K,V> implements Table<K,V>
+public abstract class AbstractTable<K, V> implements Table<K, V>
 {
     /** the name of this table */
     protected final String name;
 
     /** The global SchemaManager */
     protected SchemaManager schemaManager;
-    
+
     /** a key comparator for the keys in this Table */
     protected final Comparator<K> keyComparator;
 
@@ -50,6 +52,7 @@ public abstract class AbstractTable<K,V>
     /** the current count of entries in this Table */
     protected int count;
 
+
     /**
      * Create an instance of Table
      * 
@@ -75,8 +78,8 @@ public abstract class AbstractTable<K,V>
 
         this.valueComparator = valueComparator;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -85,7 +88,7 @@ public abstract class AbstractTable<K,V>
         return keyComparator;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -94,7 +97,7 @@ public abstract class AbstractTable<K,V>
         return valueComparator;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -102,7 +105,7 @@ public abstract class AbstractTable<K,V>
     {
         return name;
     }
-    
+
 
     /**
      * {@inheritDoc}

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java Tue Jan 24 16:27:18 2012
@@ -47,7 +47,7 @@ public class EmptyIndexCursor<K, E, ID> 
         return UNSUPPORTED_MSG;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ForwardIndexEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ForwardIndexEntry.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ForwardIndexEntry.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ForwardIndexEntry.java Tue Jan 24 16:27:18 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.xdbm;
 
+
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 
@@ -36,7 +37,7 @@ public class ForwardIndexEntry<V, ID> ex
     /** The underlying Tuple */
     private final Tuple<V, ID> tuple = new Tuple<V, ID>();
 
-    
+
     /**
      * Creates a ForwardIndexEntry instance
      */
@@ -44,8 +45,8 @@ public class ForwardIndexEntry<V, ID> ex
     {
         super( null );
     }
-    
-    
+
+
     /**
      * Sets the key value tuple represented by this ForwardIndexEntry optionally
      * setting the Entry associated with the id if one was loaded from the
@@ -140,7 +141,7 @@ public class ForwardIndexEntry<V, ID> ex
         buf.append( ", " );
         buf.append( tuple.getValue() );
         buf.append( " ]" );
-        
+
         return buf.toString();
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/GenericIndex.java Tue Jan 24 16:27:18 2012
@@ -273,7 +273,7 @@ public class GenericIndex<K, O, ID> exte
         throw new UnsupportedOperationException();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java Tue Jan 24 16:27:18 2012
@@ -264,7 +264,7 @@ public interface Index<K, O, ID>
 
     void sync() throws Exception;
 
-    
+
     /**
      * tells whether the Index implementation supports storing duplicate keys
      *

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/IndexEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/IndexEntry.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/IndexEntry.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/IndexEntry.java Tue Jan 24 16:27:18 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.xdbm;
 
+
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/MasterTable.java Tue Jan 24 16:27:18 2012
@@ -43,8 +43,8 @@ public interface MasterTable<ID, E> exte
      * @throws Exception on failure to update the id sequence
      */
     ID getNextId( E entry ) throws Exception;
-    
-    
+
+
     /**
      * Resets the root ID to 0, this method should be called after deleting the
      * context entry of the partition

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdn.java Tue Jan 24 16:27:18 2012
@@ -41,7 +41,7 @@ public class ParentIdAndRdn<ID extends C
 {
     /** The entry ID */
     protected ID parentId;
-    
+
     /** The list of Rdn for this instance */
     protected Rdn[] rdns;
 
@@ -128,9 +128,9 @@ public class ParentIdAndRdn<ID extends C
     public int hashCode()
     {
         int h = 37;
-        h = h*17 + ( ( parentId == null ) ? 0 : parentId.hashCode() );
-        h = h*17 + Arrays.hashCode( rdns );
-        
+        h = h * 17 + ( ( parentId == null ) ? 0 : parentId.hashCode() );
+        h = h * 17 + Arrays.hashCode( rdns );
+
         return h;
     }
 
@@ -144,14 +144,14 @@ public class ParentIdAndRdn<ID extends C
         {
             return true;
         }
-        
+
         if ( !( obj instanceof ParentIdAndRdn<?> ) )
         {
             return false;
         }
 
-        ParentIdAndRdn<ID> that = (ParentIdAndRdn<ID>) obj;
-        
+        ParentIdAndRdn<ID> that = ( ParentIdAndRdn<ID> ) obj;
+
         if ( rdns == null )
         {
             return that.rdns == null;
@@ -160,12 +160,12 @@ public class ParentIdAndRdn<ID extends C
         {
             return false;
         }
-        
+
         if ( rdns.length != that.rdns.length )
         {
             return false;
         }
-        
+
         for ( int i = 0; i < rdns.length; i++ )
         {
             if ( !rdns[i].equals( that.rdns[i] ) )
@@ -173,18 +173,18 @@ public class ParentIdAndRdn<ID extends C
                 return false;
             }
         }
-        
+
         return true;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
     public int compareTo( ParentIdAndRdn<ID> that )
     {
         int val = this.rdns.length - that.rdns.length;
-        
+
         if ( val != 0 )
         {
             return val;
@@ -193,7 +193,7 @@ public class ParentIdAndRdn<ID extends C
         for ( int i = 0; i < this.rdns.length; i++ )
         {
             val = this.rdns[i].getNormName().compareTo( that.rdns[i].getNormName() );
-            
+
             if ( val != 0 )
             {
                 return val;
@@ -201,7 +201,7 @@ public class ParentIdAndRdn<ID extends C
         }
 
         val = this.getParentId().compareTo( that.getParentId() );
-        
+
         return val;
     }
 
@@ -224,7 +224,7 @@ public class ParentIdAndRdn<ID extends C
         parentId = ( ID ) in.readObject();
         int size = in.readInt();
         rdns = new Rdn[size];
-        
+
         for ( int i = 0; i < size; i++ )
         {
             Rdn rdn = new Rdn();
@@ -232,20 +232,20 @@ public class ParentIdAndRdn<ID extends C
             rdns[i] = rdn;
         }
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public String toString()
     {
         StringBuilder sb = new StringBuilder();
-        
+
         sb.append( "ParentIdAndRdn<" );
         sb.append( parentId ).append( ", '" );
-        
+
         boolean isFirst = true;
-        
+
         for ( Rdn rdn : rdns )
         {
             if ( isFirst )
@@ -256,12 +256,12 @@ public class ParentIdAndRdn<ID extends C
             {
                 sb.append( "," );
             }
-            
+
             sb.append( rdn );
         }
-        
+
         sb.append( "'>" );
-        
+
         return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ParentIdAndRdnComparator.java Tue Jan 24 16:27:18 2012
@@ -34,6 +34,7 @@ public class ParentIdAndRdnComparator<ID
     /** The serial version UID */
     private static final long serialVersionUID = 2L;
 
+
     /**
      * Creates a new instance of ParentIdAndRdnComparator.
      *

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ReverseIndexEntry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ReverseIndexEntry.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ReverseIndexEntry.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ReverseIndexEntry.java Tue Jan 24 16:27:18 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.xdbm;
 
+
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 
@@ -44,8 +45,7 @@ public class ReverseIndexEntry<V, ID> ex
     {
         super( null );
     }
-    
-    
+
 
     /**
      * Sets the Tuple value represented by this ReverseIndexEntry optionally

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java Tue Jan 24 16:27:18 2012
@@ -51,7 +51,7 @@ public class SingletonIndexCursor<V, ID>
         return UNSUPPORTED_MSG;
     }
 
-    
+
     public boolean available()
     {
         return onSingleton;
@@ -175,7 +175,7 @@ public class SingletonIndexCursor<V, ID>
     public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "()" );
-        
+
         if ( onSingleton )
         {
             return singleton;

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java Tue Jan 24 16:27:18 2012
@@ -89,7 +89,7 @@ public interface Store<E, ID extends Com
      * store and it's indices to conduct search operations.
      */
     public static final String[] SYS_INDEX_OID_ARRAY =
-        { 
+        {
             ApacheSchemaConstants.APACHE_PRESENCE_AT_OID,
             ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID,
             ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID,
@@ -100,9 +100,9 @@ public interface Store<E, ID extends Com
             ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID,
             SchemaConstants.ENTRY_CSN_AT_OID,
             SchemaConstants.ENTRY_UUID_AT_OID,
-            SchemaConstants.OBJECT_CLASS_AT_OID 
-        };
-    
+            SchemaConstants.OBJECT_CLASS_AT_OID
+    };
+
     public static final Set<String> SYS_INDEX_OIDS = Collections.unmodifiableSet( new HashSet<String>( Arrays
         .asList( SYS_INDEX_OID_ARRAY ) ) );
 
@@ -130,6 +130,7 @@ public interface Store<E, ID extends Com
      */
     ID getRootId();
 
+
     /**
      * Sets the flag telling the server to flush on disk when some
      * modification has been done.
@@ -369,7 +370,7 @@ public interface Store<E, ID extends Com
      */
     Entry lookup( ID id ) throws Exception;
 
-    
+
     /**
      * Gets the count of immediate children of the given entry ID.
      *
@@ -410,7 +411,7 @@ public interface Store<E, ID extends Com
      */
     void rename( Dn dn, Rdn newRdn, boolean deleteOldRdn, Entry entry ) throws Exception;
 
-    
+
     void moveAndRename( Dn oldChildDn, Dn newParentDn, Rdn newRdn, Entry entry, boolean deleteOldRdn ) throws Exception;
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java Tue Jan 24 16:27:18 2012
@@ -126,7 +126,7 @@ public class AvlIndex<K, O> extends Abst
         {
             forward.close();
         }
-        
+
         if ( reverse != null )
         {
             reverse.close();
@@ -428,8 +428,8 @@ public class AvlIndex<K, O> extends Abst
     {
         return reverse.isDupsEnabled();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlMasterTable.java Tue Jan 24 16:27:18 2012
@@ -35,9 +35,9 @@ import org.apache.directory.server.xdbm.
 public class AvlMasterTable<E> extends AvlTable<Long, E> implements MasterTable<Long, E>
 {
     private AtomicLong counter = new AtomicLong( 0 );
-    
-    
-    public AvlMasterTable( String name, Comparator<Long> keyComparator, Comparator<E> valComparator, 
+
+
+    public AvlMasterTable( String name, Comparator<Long> keyComparator, Comparator<E> valComparator,
         boolean dupsEnabled )
     {
         super( name, keyComparator, valComparator, dupsEnabled );
@@ -51,8 +51,8 @@ public class AvlMasterTable<E> extends A
     {
         return counter.incrementAndGet();
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java Tue Jan 24 16:27:18 2012
@@ -43,13 +43,14 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AvlTable<K, V> extends AbstractTable<K,V>
+public class AvlTable<K, V> extends AbstractTable<K, V>
 {
     private final AvlTreeMap<K, V> avl;
-    private final Comparator<Tuple<K,V>> keyOnlytupleComparator;
-    
-    
-    public AvlTable( String name, final Comparator<K> keyComparator, final Comparator<V> valueComparator, boolean dupsEnabled )
+    private final Comparator<Tuple<K, V>> keyOnlytupleComparator;
+
+
+    public AvlTable( String name, final Comparator<K> keyComparator, final Comparator<V> valueComparator,
+        boolean dupsEnabled )
     {
         super( null, name, keyComparator, valueComparator );
         this.avl = new AvlTreeMapImpl<K, V>( keyComparator, valueComparator, dupsEnabled );
@@ -61,7 +62,7 @@ public class AvlTable<K, V> extends Abst
             }
         };
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -71,7 +72,7 @@ public class AvlTable<K, V> extends Abst
         ( ( AvlTreeMapImpl ) avl ).removeAll();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -81,25 +82,25 @@ public class AvlTable<K, V> extends Abst
         {
             return 0;
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.find( key );
-        
+
         if ( node == null )
         {
             return 0;
         }
-        
+
         SingletonOrOrderedSet<V> val = node.getValue();
-        
+
         if ( val.isOrderedSet() )
         {
             return val.getOrderedSet().getSize();
         }
-        
+
         return 1;
     }
 
-   
+
     /**
      * {@inheritDoc}
      */
@@ -109,25 +110,25 @@ public class AvlTable<K, V> extends Abst
         {
             return null;
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.find( key );
-        
+
         if ( node == null )
         {
             return null;
         }
-        
+
         SingletonOrOrderedSet<V> val = node.getValue();
-        
+
         if ( val.isOrderedSet() )
         {
             return val.getOrderedSet().getFirst().getKey();
         }
-        
+
         return val.getSingleton();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -136,7 +137,7 @@ public class AvlTable<K, V> extends Abst
         return avl.getSize();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -146,11 +147,11 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         return avl.find( key ) != null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -160,11 +161,11 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         return avl.find( key, value ) != null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -174,11 +175,11 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         return avl.findGreaterOrEqual( key ) != null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -188,24 +189,24 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.findGreaterOrEqual( key );
-        
+
         if ( node == null )
         {
             return false;
         }
-        
+
         if ( node.getValue().isOrderedSet() )
         {
             AvlTree<V> values = node.getValue().getOrderedSet();
             return values.findGreaterOrEqual( val ) != null;
         }
-        
+
         return valueComparator.compare( node.getValue().getSingleton(), val ) >= 0;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -215,11 +216,11 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         return avl.findLessOrEqual( key ) != null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -229,20 +230,20 @@ public class AvlTable<K, V> extends Abst
         {
             return false;
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.findLessOrEqual( key );
-        
+
         if ( node == null )
         {
             return false;
         }
-        
+
         if ( node.getValue().isOrderedSet() )
         {
             AvlTree<V> values = node.getValue().getOrderedSet();
             return values.findLessOrEqual( val ) != null;
         }
-        
+
         return valueComparator.compare( node.getValue().getSingleton(), val ) <= 0;
     }
 
@@ -254,7 +255,7 @@ public class AvlTable<K, V> extends Abst
     {
         return avl.isDupsAllowed();
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -263,7 +264,7 @@ public class AvlTable<K, V> extends Abst
     {
         return count;
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -274,14 +275,14 @@ public class AvlTable<K, V> extends Abst
         {
             return;
         }
-        
+
         if ( avl.insert( key, value ) == null )
         {
             count++;
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -291,9 +292,9 @@ public class AvlTable<K, V> extends Abst
         {
             return;
         }
-        
+
         SingletonOrOrderedSet<V> value = avl.remove( key );
-        
+
         if ( value == null )
         {
             return;
@@ -305,11 +306,11 @@ public class AvlTable<K, V> extends Abst
         }
         else
         {
-            count --;
+            count--;
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -320,22 +321,22 @@ public class AvlTable<K, V> extends Abst
             count--;
         }
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public Cursor<Tuple<K, V>> cursor() throws Exception
     {
-        if ( ! avl.isDupsAllowed() )
+        if ( !avl.isDupsAllowed() )
         {
-            return new AvlTreeMapNoDupsWrapperCursor<K, V>( new AvlSingletonOrOrderedSetCursor<K,V>( avl ) );
+            return new AvlTreeMapNoDupsWrapperCursor<K, V>( new AvlSingletonOrOrderedSetCursor<K, V>( avl ) );
         }
 
         return new AvlTableDupsCursor<K, V>( this );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -343,26 +344,26 @@ public class AvlTable<K, V> extends Abst
     {
         if ( key == null )
         {
-            return new EmptyCursor<Tuple<K,V>>();
+            return new EmptyCursor<Tuple<K, V>>();
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.find( key );
-        
+
         if ( node == null )
         {
-            return new EmptyCursor<Tuple<K,V>>();
+            return new EmptyCursor<Tuple<K, V>>();
         }
-        
+
         if ( node.getValue().isOrderedSet() )
         {
-            return new KeyTupleAvlCursor<K,V>( node.getValue().getOrderedSet(), key );
+            return new KeyTupleAvlCursor<K, V>( node.getValue().getOrderedSet(), key );
         }
-        
-        return new SingletonCursor<Tuple<K,V>>( new Tuple<K,V>( key, node.getValue().getSingleton() ), 
-                keyOnlytupleComparator );
+
+        return new SingletonCursor<Tuple<K, V>>( new Tuple<K, V>( key, node.getValue().getSingleton() ),
+            keyOnlytupleComparator );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -372,19 +373,19 @@ public class AvlTable<K, V> extends Abst
         {
             return new EmptyCursor<V>();
         }
-        
+
         LinkedAvlMapNode<K, V> node = avl.find( key );
-        
+
         if ( node == null )
         {
             return new EmptyCursor<V>();
         }
-        
+
         if ( node.getValue().isOrderedSet() )
         {
             return new AvlTreeCursor<V>( node.getValue().getOrderedSet() );
         }
-        
+
         return new SingletonCursor<V>( node.getValue().getSingleton(), valueComparator );
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java Tue Jan 24 16:27:18 2012
@@ -40,19 +40,19 @@ import org.slf4j.LoggerFactory;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AvlTableDupsCursor<K,V> extends AbstractTupleCursor<K, V>
+public class AvlTableDupsCursor<K, V> extends AbstractTupleCursor<K, V>
 {
     private static final Logger LOG = LoggerFactory.getLogger( AvlTableDupsCursor.class.getSimpleName() );
-    
+
     /** The AVL backed table this Cursor traverses over. */
-    private final AvlTable<K,V> table;
-    
+    private final AvlTable<K, V> table;
+
     /**
      * The underlying wrapped cursor which returns Tuples whose values are
      * either V objects or AvlTree objects.
      */
     private final AvlSingletonOrOrderedSetCursor<K, V> wrappedCursor;
-    
+
     /**
      * A Cursor over a set of value objects for the current key held in the
      * containerTuple.  A new Cursor will be set for each new key as we
@@ -63,25 +63,25 @@ public class AvlTableDupsCursor<K,V> ext
     private Cursor<V> dupsCursor;
 
     /** The current Tuple returned from the wrapped cursor. */
-    private final Tuple<K,SingletonOrOrderedSet<V>> wrappedTuple = new Tuple<K, SingletonOrOrderedSet<V>>();
+    private final Tuple<K, SingletonOrOrderedSet<V>> wrappedTuple = new Tuple<K, SingletonOrOrderedSet<V>>();
 
     /**
      * The Tuple that is used to return values via the get() method. This
      * same Tuple instance will be returned every time.  At different
      * positions it may return different values for the same key.
      */
-    private final Tuple<K,V> returnedTuple = new Tuple<K,V>();
+    private final Tuple<K, V> returnedTuple = new Tuple<K, V>();
 
     /** Whether or not a value is available when get() is called. */
     private boolean valueAvailable;
 
-    
+
     /**
      * Creates a new instance of AvlTableDupsCursor.
      *
      * @param table the AvlTable to build a Cursor on.
      */
-    public AvlTableDupsCursor( AvlTable<K,V> table )
+    public AvlTableDupsCursor( AvlTable<K, V> table )
     {
         this.table = table;
         this.wrappedCursor = new AvlSingletonOrOrderedSetCursor<K, V>( table.getAvlTreeMap() );
@@ -114,11 +114,11 @@ public class AvlTableDupsCursor<K,V> ext
     {
         checkNotClosed( "beforeValue()" );
         wrappedCursor.beforeKey( key );
-        
+
         if ( wrappedCursor.next() )
         {
             wrappedTuple.setBoth( wrappedCursor.get() );
-            
+
             if ( wrappedTuple.getValue().isOrderedSet() )
             {
                 AvlTree<V> avlTree = wrappedTuple.getValue().getOrderedSet();
@@ -126,16 +126,16 @@ public class AvlTableDupsCursor<K,V> ext
             }
             else
             {
-                dupsCursor = new SingletonCursor<V>( 
+                dupsCursor = new SingletonCursor<V>(
                     wrappedTuple.getValue().getSingleton(), wrappedCursor.getValuComparator() );
             }
-            
+
             if ( value == null )
             {
                 clearValue();
                 return;
             }
-    
+
             /* 
              * The cursor over the values is only advanced if we're on the 
              * same key as the primary cursor.  This is because we want this
@@ -146,16 +146,16 @@ public class AvlTableDupsCursor<K,V> ext
             {
                 dupsCursor.before( value );
             }
-            
+
             clearValue();
             return;
         }
-        
+
         clearValue();
         wrappedTuple.setKey( null );
         wrappedTuple.setValue( null );
     }
-    
+
 
     /**
      * {@inheritDoc}
@@ -165,7 +165,7 @@ public class AvlTableDupsCursor<K,V> ext
         afterValue( key, null );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -238,7 +238,7 @@ public class AvlTableDupsCursor<K,V> ext
         wrappedTuple.setValue( null );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -247,7 +247,7 @@ public class AvlTableDupsCursor<K,V> ext
         afterValue( element.getKey(), element.getValue() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -270,7 +270,7 @@ public class AvlTableDupsCursor<K,V> ext
         beforeValue( element.getKey(), element.getValue() );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -284,7 +284,7 @@ public class AvlTableDupsCursor<K,V> ext
         dupsCursor = null;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -314,7 +314,7 @@ public class AvlTableDupsCursor<K,V> ext
              * call to last() will always return true.
              */
             dupsCursor.first();
-            valueAvailable =  true;
+            valueAvailable = true;
             returnedTuple.setKey( wrappedTuple.getKey() );
             returnedTuple.setValue( dupsCursor.get() );
             return true;
@@ -323,7 +323,7 @@ public class AvlTableDupsCursor<K,V> ext
         return false;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -331,7 +331,7 @@ public class AvlTableDupsCursor<K,V> ext
     {
         checkNotClosed( "get()" );
 
-        if ( ! valueAvailable )
+        if ( !valueAvailable )
         {
             throw new InvalidCursorPositionException();
         }
@@ -339,7 +339,7 @@ public class AvlTableDupsCursor<K,V> ext
         return returnedTuple;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -378,7 +378,7 @@ public class AvlTableDupsCursor<K,V> ext
         return false;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -389,7 +389,7 @@ public class AvlTableDupsCursor<K,V> ext
          * If the cursor over the values of the current key is null or is
          * extinguished then we need to advance to the next key.
          */
-        if ( null == dupsCursor || ! dupsCursor.next() )
+        if ( null == dupsCursor || !dupsCursor.next() )
         {
             /*
              * If the wrappedCursor cursor has more elements we get the next
@@ -400,7 +400,7 @@ public class AvlTableDupsCursor<K,V> ext
                 wrappedTuple.setBoth( wrappedCursor.get() );
                 SingletonOrOrderedSet<V> values = wrappedTuple.getValue();
 
-                if ( values.isOrderedSet())
+                if ( values.isOrderedSet() )
                 {
                     dupsCursor = new AvlTreeCursor<V>( values.getOrderedSet() );
                 }
@@ -437,7 +437,7 @@ public class AvlTableDupsCursor<K,V> ext
         return valueAvailable = true;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -448,7 +448,7 @@ public class AvlTableDupsCursor<K,V> ext
          * If the cursor over the values of the current key is null or is
          * extinguished then we need to advance to the previous key.
          */
-        if ( null == dupsCursor || ! dupsCursor.previous() )
+        if ( null == dupsCursor || !dupsCursor.previous() )
         {
             /*
              * If the wrappedCursor cursor has more elements we get the previous

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java Tue Jan 24 16:27:18 2012
@@ -37,7 +37,7 @@ public class AllEntriesCursor<ID extends
 {
     /** The index entry we use to return entries one by one.  */
     private IndexEntry<ID, ID> indexEntry = new ForwardIndexEntry<ID, ID>();
-    
+
     /** The cursor on the EntryUUID index */
     private final IndexCursor<String, Entry, ID> wrapped;
 
@@ -50,7 +50,7 @@ public class AllEntriesCursor<ID extends
         return UNSUPPORTED_MSG;
     }
 
-    
+
     /**
      * Creates a new instance of AllEntriesCursor
      * @param db
@@ -69,7 +69,7 @@ public class AllEntriesCursor<ID extends
     public void afterValue( ID key, ID value ) throws Exception
     {
         checkNotClosed( "afterValue()" );
-        
+
         wrapped.afterValue( key, null );
     }
 
@@ -80,7 +80,7 @@ public class AllEntriesCursor<ID extends
     public void beforeValue( ID id, ID value ) throws Exception
     {
         checkNotClosed( "beforeValue()" );
-        
+
         wrapped.beforeValue( id, null );
     }
 
@@ -91,7 +91,7 @@ public class AllEntriesCursor<ID extends
     public void after( IndexEntry<ID, ID> indexEntry ) throws Exception
     {
         checkNotClosed( "after()" );
-        
+
         wrapped.afterValue( indexEntry.getId(), null );
     }
 
@@ -102,7 +102,7 @@ public class AllEntriesCursor<ID extends
     public void afterLast() throws Exception
     {
         checkNotClosed( "afterLast()" );
-        
+
         wrapped.afterLast();
     }
 
@@ -122,7 +122,7 @@ public class AllEntriesCursor<ID extends
     public void before( IndexEntry<ID, ID> indexEntry ) throws Exception
     {
         checkNotClosed( "before()" );
-        
+
         wrapped.beforeValue( indexEntry.getId(), null );
     }
 
@@ -133,7 +133,7 @@ public class AllEntriesCursor<ID extends
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
-        
+
         wrapped.beforeFirst();
     }
 
@@ -144,7 +144,7 @@ public class AllEntriesCursor<ID extends
     public boolean first() throws Exception
     {
         checkNotClosed( "first()" );
-        
+
         return wrapped.first();
     }
 
@@ -155,13 +155,13 @@ public class AllEntriesCursor<ID extends
     public IndexEntry<ID, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        
+
         // Create the returned IndexEntry, copying what we get from the wrapped cursor
         IndexEntry<String, ID> wrappedEntry = wrapped.get();
         indexEntry.setId( wrappedEntry.getId() );
         indexEntry.setValue( wrappedEntry.getId() );
         indexEntry.setEntry( wrappedEntry.getEntry() );
-        
+
         return indexEntry;
     }
 
@@ -172,7 +172,7 @@ public class AllEntriesCursor<ID extends
     public boolean last() throws Exception
     {
         checkNotClosed( "last()" );
-        
+
         return wrapped.last();
     }
 
@@ -183,7 +183,7 @@ public class AllEntriesCursor<ID extends
     public boolean next() throws Exception
     {
         checkNotClosed( "next()" );
-        
+
         return wrapped.next();
     }
 
@@ -194,7 +194,7 @@ public class AllEntriesCursor<ID extends
     public boolean previous() throws Exception
     {
         checkNotClosed( "previous()" );
-        
+
         return wrapped.previous();
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java Tue Jan 24 16:27:18 2012
@@ -43,10 +43,10 @@ public class AndCursor<V, ID> extends Ab
 {
     /** The message for unsupported operations */
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_707 );
-    
+
     /** */
     private final IndexCursor<V, Entry, ID> wrapped;
-    
+
     /** The evaluators used for the members of the And filter */
     private final List<Evaluator<? extends ExprNode, Entry, ID>> evaluators;
 
@@ -74,7 +74,7 @@ public class AndCursor<V, ID> extends Ab
         return UNSUPPORTED_MSG;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -103,7 +103,7 @@ public class AndCursor<V, ID> extends Ab
     public boolean first() throws Exception
     {
         beforeFirst();
-        
+
         return next();
     }
 
@@ -114,7 +114,7 @@ public class AndCursor<V, ID> extends Ab
     public boolean last() throws Exception
     {
         afterLast();
-        
+
         return previous();
     }
 
@@ -129,7 +129,7 @@ public class AndCursor<V, ID> extends Ab
             checkNotClosed( "previous()" );
 
             IndexEntry<V, ID> candidate = wrapped.get();
-            
+
             if ( matches( candidate ) )
             {
                 return setAvailable( true );
@@ -149,14 +149,14 @@ public class AndCursor<V, ID> extends Ab
         {
             checkNotClosed( "next()" );
             IndexEntry<V, ID> candidate = wrapped.get();
-            
+
             if ( matches( candidate ) )
             {
                 return setAvailable( true );
             }
         }
 
-        return setAvailable( false);
+        return setAvailable( false );
     }
 
 
@@ -166,7 +166,7 @@ public class AndCursor<V, ID> extends Ab
     public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        
+
         if ( available() )
         {
             return wrapped.get();

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java Tue Jan 24 16:27:18 2012
@@ -74,7 +74,7 @@ public class AndEvaluator<ID> implements
         List<Evaluator<? extends ExprNode, Entry, ID>> optimized = new ArrayList<Evaluator<? extends ExprNode, Entry, ID>>(
             unoptimized.size() );
         optimized.addAll( unoptimized );
-        
+
         Collections.sort( optimized, new ScanCountComparator<ID>() );
 
         return optimized;

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java Tue Jan 24 16:27:18 2012
@@ -57,6 +57,7 @@ public class ApproximateCursor<V, ID ext
     /** NDN Cursor on all entries in  (set when no index on user attribute) */
     private final IndexCursor<String, Entry, ID> uuidIdxCursor;
 
+
     /**
      * Creates a new instance of ApproximateCursor
      * @param db The Store we want to build a cursor on
@@ -70,7 +71,7 @@ public class ApproximateCursor<V, ID ext
 
         AttributeType attributeType = approximateEvaluator.getExpression().getAttributeType();
         Value<V> value = approximateEvaluator.getExpression().getValue();
-        
+
         if ( db.hasIndexOn( attributeType ) )
         {
             Index<V, Entry, ID> index = ( Index<V, Entry, ID> ) db.getIndex( attributeType );
@@ -93,7 +94,7 @@ public class ApproximateCursor<V, ID ext
         return UNSUPPORTED_MSG;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -114,7 +115,7 @@ public class ApproximateCursor<V, ID ext
     public void beforeValue( ID id, V value ) throws Exception
     {
         checkNotClosed( "beforeValue()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.beforeValue( id, value );
@@ -132,7 +133,7 @@ public class ApproximateCursor<V, ID ext
     public void afterValue( ID id, V value ) throws Exception
     {
         checkNotClosed( "afterValue()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.afterValue( id, value );
@@ -150,7 +151,7 @@ public class ApproximateCursor<V, ID ext
     public void before( IndexEntry<V, ID> element ) throws Exception
     {
         checkNotClosed( "before()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.before( element );
@@ -169,7 +170,7 @@ public class ApproximateCursor<V, ID ext
     public void after( IndexEntry<V, ID> element ) throws Exception
     {
         checkNotClosed( "after()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.after( element );
@@ -205,7 +206,7 @@ public class ApproximateCursor<V, ID ext
     public void afterLast() throws Exception
     {
         checkNotClosed( "afterLast()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.afterLast();
@@ -224,7 +225,7 @@ public class ApproximateCursor<V, ID ext
     public boolean first() throws Exception
     {
         beforeFirst();
-        
+
         return next();
     }
 
@@ -235,7 +236,7 @@ public class ApproximateCursor<V, ID ext
     public boolean last() throws Exception
     {
         afterLast();
-        
+
         return previous();
     }
 
@@ -254,7 +255,7 @@ public class ApproximateCursor<V, ID ext
         {
             checkNotClosed( "previous()" );
             IndexEntry<?, ID> candidate = uuidIdxCursor.get();
-            
+
             if ( approximateEvaluator.evaluate( candidate ) )
             {
                 return setAvailable( true );
@@ -279,7 +280,7 @@ public class ApproximateCursor<V, ID ext
         {
             checkNotClosed( "next()" );
             IndexEntry<?, ID> candidate = uuidIdxCursor.get();
-            
+
             if ( approximateEvaluator.evaluate( candidate ) )
             {
                 return setAvailable( true );
@@ -289,6 +290,7 @@ public class ApproximateCursor<V, ID ext
         return setAvailable( false );
     }
 
+
     /**
      * {@inheritDoc}
      */
@@ -296,7 +298,7 @@ public class ApproximateCursor<V, ID ext
     public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        
+
         if ( userIdxCursor != null )
         {
             return userIdxCursor.get();

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java Tue Jan 24 16:27:18 2012
@@ -54,7 +54,7 @@ public class ApproximateEvaluator<T, ID 
         throws Exception
     {
         super( node, db, schemaManager );
-        
+
         if ( db.hasIndexOn( attributeType ) )
         {
             idx = ( Index<T, Entry, ID> ) db.getIndex( attributeType );
@@ -83,7 +83,7 @@ public class ApproximateEvaluator<T, ID 
      */
     public ApproximateNode<T> getExpression()
     {
-        return (ApproximateNode<T>)node;
+        return ( ApproximateNode<T> ) node;
     }
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java Tue Jan 24 16:27:18 2012
@@ -68,7 +68,7 @@ public class CursorBuilder<ID extends Co
     {
         switch ( node.getAssertionType() )
         {
-            /* ---------- LEAF NODE HANDLING ---------- */
+        /* ---------- LEAF NODE HANDLING ---------- */
 
             case APPROXIMATE:
                 return new ApproximateCursor<T, ID>( db, ( ApproximateEvaluator<T, ID> ) evaluatorBuilder.build( node ) );
@@ -173,12 +173,12 @@ public class CursorBuilder<ID extends Co
         {
             ExprNode child = children.get( i );
             Object count = child.get( "count" );
-            
+
             if ( count == null )
             {
                 continue;
             }
-            
+
             value = ( Long ) count;
             minValue = Math.min( minValue, value );
 
@@ -192,7 +192,7 @@ public class CursorBuilder<ID extends Co
         ExprNode minChild = children.get( minIndex );
         List<Evaluator<? extends ExprNode, Entry, ID>> childEvaluators = new ArrayList<Evaluator<? extends ExprNode, Entry, ID>>(
             children.size() - 1 );
-        
+
         for ( ExprNode child : children )
         {
             if ( child == minChild )
@@ -205,7 +205,7 @@ public class CursorBuilder<ID extends Co
 
         // Do recursive call to build min child Cursor then create AndCursor
         IndexCursor<?, Entry, ID> childCursor = build( minChild );
-        
+
         return new AndCursor( childCursor, childEvaluators );
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java Tue Jan 24 16:27:18 2012
@@ -76,7 +76,7 @@ public class DefaultOptimizer<E, ID exte
         {
             try
             {
-                this.contextEntryId = db.getEntryId( ((Partition)db).getSuffixDn() );
+                this.contextEntryId = db.getEntryId( ( ( Partition ) db ).getSuffixDn() );
             }
             catch ( Exception e )
             {
@@ -162,7 +162,7 @@ public class DefaultOptimizer<E, ID exte
                 /** Cannot really say so we presume the total index count */
                 count = getFullScan( leaf );
             }
-            else if ( node instanceof ApproximateNode)
+            else if ( node instanceof ApproximateNode )
             {
                 /** Feature not implemented so we just use equality matching */
                 count = getEqualityScan( ( ApproximateNode ) leaf );
@@ -183,9 +183,9 @@ public class DefaultOptimizer<E, ID exte
             }
             else if ( node instanceof OrNode )
             {
-                count = getDisjunctionScan( (OrNode) node );
+                count = getDisjunctionScan( ( OrNode ) node );
             }
-            else if ( node instanceof NotNode)
+            else if ( node instanceof NotNode )
             {
                 annotate( ( ( NotNode ) node ).getFirstChild() );
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Tue Jan 24 16:27:18 2012
@@ -107,7 +107,7 @@ public class DefaultSearchEngine<ID exte
         // Check that we have an entry, otherwise we can immediately get out
         if ( baseId == null )
         {
-            if ( ((Partition)db).getSuffixDn().equals( base ) )
+            if ( ( ( Partition ) db ).getSuffixDn().equals( base ) )
             {
                 // The context entry is not created yet, return an empty cursor
                 return new EmptyIndexCursor<ID, Entry, ID>();
@@ -174,8 +174,8 @@ public class DefaultSearchEngine<ID exte
 
         // Add the scope node using the effective base to the filter
         BranchNode root = new AndNode();
-        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase, SearchScope.getSearchScope(searchCtls
-                .getSearchScope()) );
+        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase, SearchScope.getSearchScope( searchCtls
+            .getSearchScope() ) );
         root.getChildren().add( node );
         root.getChildren().add( filter );
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java Tue Jan 24 16:27:18 2012
@@ -69,7 +69,7 @@ public class EqualityCursor<V, ID extend
 
         AttributeType attributeType = equalityEvaluator.getExpression().getAttributeType();
         Value<V> value = equalityEvaluator.getExpression().getValue();
-        
+
         if ( db.hasIndexOn( attributeType ) )
         {
             Index<V, Entry, ID> userIndex = ( Index<V, Entry, ID> ) db.getIndex( attributeType );
@@ -92,7 +92,7 @@ public class EqualityCursor<V, ID extend
         return UNSUPPORTED_MSG;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -113,7 +113,7 @@ public class EqualityCursor<V, ID extend
     public void beforeValue( ID id, V value ) throws Exception
     {
         checkNotClosed( "beforeValue()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.beforeValue( id, value );
@@ -131,7 +131,7 @@ public class EqualityCursor<V, ID extend
     public void before( IndexEntry<V, ID> element ) throws Exception
     {
         checkNotClosed( "before()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.before( element );
@@ -149,7 +149,7 @@ public class EqualityCursor<V, ID extend
     public void afterValue( ID id, V value ) throws Exception
     {
         checkNotClosed( "afterValue()" );
-        
+
         if ( userIdxCursor
             != null )
         {
@@ -168,7 +168,7 @@ public class EqualityCursor<V, ID extend
     public void after( IndexEntry<V, ID> element ) throws Exception
     {
         checkNotClosed( "after()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.after( element );
@@ -186,7 +186,7 @@ public class EqualityCursor<V, ID extend
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.beforeFirst();
@@ -206,7 +206,7 @@ public class EqualityCursor<V, ID extend
     public void afterLast() throws Exception
     {
         checkNotClosed( "afterLast()" );
-        
+
         if ( userIdxCursor != null )
         {
             userIdxCursor.afterLast();
@@ -226,7 +226,7 @@ public class EqualityCursor<V, ID extend
     public boolean first() throws Exception
     {
         beforeFirst();
-        
+
         return next();
     }
 
@@ -237,7 +237,7 @@ public class EqualityCursor<V, ID extend
     public boolean last() throws Exception
     {
         afterLast();
-        
+
         return previous();
     }
 
@@ -256,7 +256,7 @@ public class EqualityCursor<V, ID extend
         {
             checkNotClosed( "previous()" );
             IndexEntry<?, ID> candidate = uuidIdxCursor.get();
-            
+
             if ( equalityEvaluator.evaluate( candidate ) )
             {
                 return setAvailable( true );
@@ -281,7 +281,7 @@ public class EqualityCursor<V, ID extend
         {
             checkNotClosed( "next()" );
             IndexEntry<?, ID> candidate = uuidIdxCursor.get();
-            
+
             if ( equalityEvaluator.evaluate( candidate ) )
             {
                 return setAvailable( true );
@@ -299,7 +299,7 @@ public class EqualityCursor<V, ID extend
     public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        
+
         if ( userIdxCursor != null )
         {
             return userIdxCursor.get();

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java Tue Jan 24 16:27:18 2012
@@ -88,7 +88,7 @@ public class EqualityEvaluator<T, ID ext
 
     public EqualityNode<T> getExpression()
     {
-        return (EqualityNode<T>)node;
+        return ( EqualityNode<T> ) node;
     }
 
 
@@ -187,7 +187,7 @@ public class EqualityEvaluator<T, ID ext
                 }
                 else
                 {
-                    nodeValue = Strings.utf8ToString(((Value<byte[]>) node.getValue()).getNormValue());
+                    nodeValue = Strings.utf8ToString( ( ( Value<byte[]> ) node.getValue() ).getNormValue() );
                 }
 
                 if ( ldapComparator != null )
@@ -208,12 +208,12 @@ public class EqualityEvaluator<T, ID ext
             else
             {
                 // Deal with a binary value
-                byte[] serverValue = ( (Value<byte[]>) value ).getNormValue();
+                byte[] serverValue = ( ( Value<byte[]> ) value ).getNormValue();
                 byte[] nodeValue = ( ( Value<byte[]> ) node.getValue() ).getNormValue();
 
                 if ( ldapComparator != null )
                 {
-                    if ( ldapComparator.compare( (Object)serverValue, (Object)nodeValue ) == 0 )
+                    if ( ldapComparator.compare( ( Object ) serverValue, ( Object ) nodeValue ) == 0 )
                     {
                         return true;
                     }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java?rev=1235334&r1=1235333&r2=1235334&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java Tue Jan 24 16:27:18 2012
@@ -73,7 +73,7 @@ public class EvaluatorBuilder<ID extends
     {
         switch ( node.getAssertionType() )
         {
-            /* ---------- LEAF NODE HANDLING ---------- */
+        /* ---------- LEAF NODE HANDLING ---------- */
 
             case APPROXIMATE:
                 return new ApproximateEvaluator<T, ID>( ( ApproximateNode<T> ) node, db, schemaManager );
@@ -109,7 +109,7 @@ public class EvaluatorBuilder<ID extends
                 return buildAndEvaluator( ( AndNode ) node );
 
             case NOT:
-                return new NotEvaluator<ID>( (NotNode) node, build( ( ( NotNode ) node ).getFirstChild() ) );
+                return new NotEvaluator<ID>( ( NotNode ) node, build( ( ( NotNode ) node ).getFirstChild() ) );
 
             case OR:
                 return buildOrEvaluator( ( OrNode ) node );



Mime
View raw message