directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1423287 [1/3] - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/ core-api/src/main/java/org/apache/directory/server/core/api/filtering/ core-api/src/test/java/org/apache/directory/server/core/api/ ...
Date Tue, 18 Dec 2012 06:29:05 GMT
Author: elecharny
Date: Tue Dec 18 06:28:48 2012
New Revision: 1423287

URL: http://svn.apache.org/viewvc?rev=1423287&view=rev
Log:
o Most of the cursor methods now throw an LdapException
o Added some missing Javadoc

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/EntryToResponseCursor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java
    directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java
    directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/apacheds/trunk/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
    directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/provider/ReplicaJournalCursor.java
    directory/apacheds/trunk/test-framework/src/main/java/org/apache/directory/server/core/integ/DelayInducingInterceptor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Index.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/KeyTupleArrayCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTableDupsCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PassThroughEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/EntryToResponseCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/EntryToResponseCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/EntryToResponseCursor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/EntryToResponseCursor.java Tue Dec 18 06:28:48 2012
@@ -28,7 +28,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
-import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
@@ -64,8 +63,10 @@ public class EntryToResponseCursor exten
     /** a reference to hold the SearchResultDone response */
     private SearchResultDone searchDoneResp;
 
+    /** The done flag */
     private boolean done;
 
+    /** The messsage ID */
     private int messageId;
 
 
@@ -87,31 +88,46 @@ public class EntryToResponseCursor exten
     }
 
 
-    public void after( Response resp ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Response resp ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         wrapped.afterLast();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean available()
     {
         return wrapped.available();
     }
 
 
-    public void before( Response resp ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( Response resp ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException();
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         wrapped.beforeFirst();
     }
@@ -145,7 +161,10 @@ public class EntryToResponseCursor exten
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         return wrapped.first();
     }
@@ -184,13 +203,19 @@ public class EntryToResponseCursor exten
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         return wrapped.last();
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         boolean next = wrapped.next();
 
@@ -205,12 +230,18 @@ public class EntryToResponseCursor exten
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         return wrapped.previous();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setClosureMonitor( ClosureMonitor monitor )
     {
         wrapped.setClosureMonitor( monitor );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java Tue Dec 18 06:28:48 2012
@@ -32,8 +32,10 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.OperationAbandonedException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -203,13 +205,10 @@ public class BaseEntryFilteringCursor ex
     // ------------------------------------------------------------------------
     // Cursor Interface Methods
     // ------------------------------------------------------------------------
-    /*
-     * @see Cursor#after(Object)
-     */
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.filtering.EntryFilteringCursor#after(org.apache.directory.server.core.entry.ClonedServerEntry)
+    /**
+     * {@inheritDoc}
      */
-    public void after( Entry element ) throws Exception
+    public void after( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException();
     }
@@ -218,7 +217,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         wrapped.afterLast();
         prefetched = null;
@@ -234,13 +233,10 @@ public class BaseEntryFilteringCursor ex
     }
 
 
-    /*
-     * @see Cursor#before(java.lang.Object)
-     */
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.filtering.EntryFilteringCursor#before(org.apache.directory.server.core.entry.ClonedServerEntry)
+    /**
+     * {@inheritDoc}
      */
-    public void before( Entry element ) throws Exception
+    public void before( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException();
     }
@@ -249,7 +245,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         wrapped.beforeFirst();
         prefetched = null;
@@ -286,6 +282,9 @@ public class BaseEntryFilteringCursor ex
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public final void setClosureMonitor( ClosureMonitor monitor )
     {
         wrapped.setClosureMonitor( monitor );
@@ -295,7 +294,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         if ( operationContext.isAbandoned() )
         {
@@ -336,7 +335,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         if ( operationContext.isAbandoned() )
         {
@@ -354,7 +353,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         if ( operationContext.isAbandoned() )
         {
@@ -439,7 +438,7 @@ public class BaseEntryFilteringCursor ex
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         if ( operationContext.isAbandoned() )
         {

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/CursorList.java Tue Dec 18 06:28:48 2012
@@ -32,6 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -164,12 +165,10 @@ public class CursorList extends Abstract
 
 
     /**
-     * @throws IllegalStateException if the underlying list is not sorted
-     * and/or a comparator is not provided.
+     * {@inheritDoc}
      */
-    public void before( Entry element ) throws Exception
+    public void before( Entry element ) throws LdapException, CursorException, IOException
     {
-        // checkNotClosed( "before()" );
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02008_LIST_MAY_BE_SORTED ) );
     }
 
@@ -177,7 +176,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public void after( Entry element ) throws Exception
+    public void after( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02008_LIST_MAY_BE_SORTED ) );
     }
@@ -186,7 +185,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         index = 0;
         currentCursor = list.get( index );
@@ -197,7 +196,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         index = end - 1;
         currentCursor = list.get( index );
@@ -208,7 +207,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         if ( listSize > 0 )
         {
@@ -224,7 +223,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         if ( listSize > 0 )
         {
@@ -241,7 +240,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean isFirst() throws Exception
+    public boolean isFirst()
     {
         return ( listSize > 0 ) && ( index == start ) && list.get( index ).isFirst();
     }
@@ -250,7 +249,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean isLast() throws Exception
+    public boolean isLast()
     {
         return ( listSize > 0 ) && ( index == end - 1 ) && list.get( index ).isLast();
     }
@@ -259,7 +258,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean isAfterLast() throws Exception
+    public boolean isAfterLast()
     {
         return ( index == end );
     }
@@ -268,7 +267,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean isBeforeFirst() throws Exception
+    public boolean isBeforeFirst()
     {
         return index == -1;
     }
@@ -277,7 +276,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         // if parked at -1 we cannot go backwards
         if ( index == -1 )
@@ -330,7 +329,7 @@ public class CursorList extends Abstract
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         if ( listSize > 0 )
         {
@@ -457,6 +456,9 @@ public class CursorList extends Abstract
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void close()
     {
         if ( IS_DEBUG )
@@ -468,6 +470,9 @@ public class CursorList extends Abstract
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void close( Exception reason )
     {
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/filtering/EntryFilter.java Tue Dec 18 06:28:48 2012
@@ -22,6 +22,7 @@ package org.apache.directory.server.core
 
 import org.apache.directory.server.core.api.interceptor.context.SearchOperationContext;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 
 
 /**
@@ -47,7 +48,7 @@ public interface EntryFilter
      * @return true if the entry is to be returned, false if it is rejected
      * @throws Exception if there are failures during evaluation
      */
-    boolean accept( SearchOperationContext operation, Entry result ) throws Exception;
+    boolean accept( SearchOperationContext operation, Entry result ) throws LdapException;
     
     
     /**

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java (original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/api/MockCursor.java Tue Dec 18 06:28:48 2012
@@ -25,9 +25,11 @@ import java.util.NoSuchElementException;
 
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.ClosureMonitor;
+import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.util.exception.NotImplementedException;
 
@@ -76,29 +78,44 @@ public class MockCursor extends Abstract
     }
 
 
-    public void after( Entry element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Entry element ) throws LdapException, CursorException, IOException
     {
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
     }
 
 
-    public void before( Entry element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new NotImplementedException();
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         ii = -1;
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         ii = 0;
         return ii < count;
@@ -123,7 +140,10 @@ public class MockCursor extends Abstract
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         ii = count;
         return true;
@@ -143,7 +163,10 @@ public class MockCursor extends Abstract
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         if ( ii < 0 )
         {

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java Tue Dec 18 06:28:48 2012
@@ -25,6 +25,7 @@ import java.io.IOException;
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -71,7 +72,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after" );
 
@@ -101,7 +102,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast" );
 
@@ -122,7 +123,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void before( E element ) throws Exception
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before" );
 
@@ -152,7 +153,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst" );
 
@@ -164,7 +165,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first" );
 
@@ -202,7 +203,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last" );
 
@@ -224,7 +225,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next" );
 
@@ -269,7 +270,7 @@ public class ArrayTreeCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous" );
 

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlSingletonOrOrderedSetCursor.java Tue Dec 18 06:28:48 2012
@@ -27,6 +27,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -79,13 +80,19 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public void after( Tuple<K, SingletonOrOrderedSet<V>> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Tuple<K, SingletonOrOrderedSet<V>> element ) throws LdapException, CursorException, IOException
     {
         afterKey( element.getKey() );
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast" );
         node = null;
@@ -99,13 +106,16 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public void before( Tuple<K, SingletonOrOrderedSet<V>> element ) throws Exception
+    public void before( Tuple<K, SingletonOrOrderedSet<V>> element ) throws LdapException, CursorException, IOException
     {
         beforeKey( element.getKey() );
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst" );
         node = null;
@@ -113,7 +123,10 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first" );
 
@@ -150,7 +163,10 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last" );
 
@@ -169,7 +185,10 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next" );
 
@@ -207,7 +226,10 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous" );
 
@@ -243,7 +265,10 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public void afterKey( K key ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterKey( K key ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterKey" );
 
@@ -275,7 +300,7 @@ public class AvlSingletonOrOrderedSetCur
     }
 
 
-    public void beforeKey( K key ) throws Exception
+    public void beforeKey( K key ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeKey" );
 

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java Tue Dec 18 06:28:48 2012
@@ -25,6 +25,7 @@ import java.io.IOException;
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,7 +64,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public void after( E element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after" );
 
@@ -89,7 +93,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast" );
         node = null;
@@ -103,7 +110,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public void before( E element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before" );
 
@@ -129,7 +139,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst" );
         node = null;
@@ -137,7 +150,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first" );
 
@@ -172,7 +188,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last" );
 
@@ -191,7 +210,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next" );
 
@@ -227,7 +249,10 @@ public class AvlTreeCursor<E> extends Ab
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous" );
 

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMapNoDupsWrapperCursor.java Tue Dec 18 06:28:48 2012
@@ -26,6 +26,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -83,37 +84,55 @@ public class AvlTreeMapNoDupsWrapperCurs
     }
 
 
-    public void after( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         wrapped.afterKey( element.getKey() );
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         wrapped.afterLast();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean available()
     {
         return wrapped.available();
     }
 
 
-    public void before( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         wrapped.beforeKey( element.getKey() );
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         wrapped.beforeFirst();
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         return wrapped.first();
     }
@@ -141,19 +160,28 @@ public class AvlTreeMapNoDupsWrapperCurs
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         return wrapped.last();
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         return wrapped.next();
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         return wrapped.previous();
     }

Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/KeyTupleAvlCursor.java Tue Dec 18 06:28:48 2012
@@ -26,6 +26,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -130,7 +131,7 @@ public class KeyTupleAvlCursor<K, V> ext
      * @param element the valueTuple who's value is used to position this Cursor
      * @throws Exception if there are failures to position the Cursor
      */
-    public void before( Tuple<K, V> element ) throws Exception
+    public void before( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
         wrapped.before( element.getValue() );
@@ -138,7 +139,10 @@ public class KeyTupleAvlCursor<K, V> ext
     }
 
 
-    public void after( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after()" );
         wrapped.after( element.getValue() );
@@ -146,7 +150,10 @@ public class KeyTupleAvlCursor<K, V> ext
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         wrapped.beforeFirst();
@@ -154,7 +161,10 @@ public class KeyTupleAvlCursor<K, V> ext
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         wrapped.afterLast();
@@ -162,21 +172,30 @@ public class KeyTupleAvlCursor<K, V> ext
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
         return next();
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
         return previous();
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
         if ( wrapped.previous() )
@@ -193,9 +212,13 @@ public class KeyTupleAvlCursor<K, V> ext
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
+        
         if ( wrapped.next() )
         {
             returnedTuple.setKey( key );

Modified: directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Tue Dec 18 06:28:48 2012
@@ -1325,7 +1325,7 @@ public class AciAuthorizationInterceptor
     }
 
 
-    private boolean filter( OperationContext opContext, Dn normName, Entry clonedEntry ) throws Exception
+    private boolean filter( OperationContext opContext, Dn normName, Entry clonedEntry ) throws LdapException
     {
         /*
          * First call hasPermission() for entry level "Browse" and "ReturnDN" perm
@@ -1436,7 +1436,7 @@ public class AciAuthorizationInterceptor
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws LdapException
         {
             Dn normName = entry.getDn().apply( schemaManager );
 

Modified: directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/authz/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Tue Dec 18 06:28:48 2012
@@ -94,7 +94,7 @@ public class DefaultAuthorizationInterce
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext operation, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext operation, Entry entry ) throws LdapException
         {
             return DefaultAuthorizationInterceptor.this.isSearchable( operation, entry );
         }
@@ -520,7 +520,7 @@ public class DefaultAuthorizationInterce
 
     // False positive, we want to keep the comment
     @SuppressWarnings("PMD.CollapsibleIfStatements")
-    private boolean isSearchable( OperationContext opContext, Entry entry ) throws Exception
+    private boolean isSearchable( OperationContext opContext, Entry entry ) throws LdapException
     {
         Dn principalDn = opContext.getSession().getEffectivePrincipal().getDn();
         Dn dn = entry.getDn();

Modified: directory/apacheds/trunk/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java Tue Dec 18 06:28:48 2012
@@ -86,7 +86,7 @@ public class CollectiveAttributeIntercep
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext operation, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext operation, Entry entry ) throws LdapException
         {
             addCollectiveAttributes( operation, entry );
 

Modified: directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/operational/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Tue Dec 18 06:28:48 2012
@@ -101,7 +101,7 @@ public class OperationalAttributeInterce
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext operation, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext operation, Entry entry ) throws LdapException
         {
             if ( operation.getReturningAttributesString() == null )
             {

Modified: directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/schema/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Tue Dec 18 06:28:48 2012
@@ -872,7 +872,7 @@ public class SchemaInterceptor extends B
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext operationContext, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext operationContext, Entry entry ) throws LdapException
         {
             ServerEntryUtils.filterContents( 
                 operationContext.getSession().getDirectoryService().getSchemaManager(),

Modified: directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/apacheds/trunk/interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Tue Dec 18 06:28:48 2012
@@ -138,7 +138,7 @@ public class SubentryInterceptor extends
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws LdapException
         {
             // See if the requested entry is a subentry
             if ( directoryService.getSubentryCache().hasSubentry( entry.getDn() ) )
@@ -169,7 +169,7 @@ public class SubentryInterceptor extends
         /**
          * {@inheritDoc}
          */
-        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws Exception
+        public boolean accept( SearchOperationContext searchContext, Entry entry ) throws LdapException
         {
             // See if the requested entry is a subentry
             if ( directoryService.getSubentryCache().hasSubentry( entry.getDn() ) )

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java Tue Dec 18 06:28:48 2012
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -75,7 +76,7 @@ public class DupsContainerCursor<K, V> e
      * @throws java.io.IOException of there are problems accessing the BTree or if this table
      * does not allow duplicate values
      */
-    public DupsContainerCursor( JdbmTable<K, V> table ) throws IOException
+    public DupsContainerCursor( JdbmTable<K, V> table )
     {
         if ( IS_DEBUG )
         {
@@ -117,7 +118,7 @@ public class DupsContainerCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void beforeKey( K key ) throws Exception
+    public void beforeKey( K key ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeKey()" );
         this.closeBrowser( browser );
@@ -131,7 +132,7 @@ public class DupsContainerCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void afterKey( K key ) throws Exception
+    public void afterKey( K key ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterKey()" );
 
@@ -196,7 +197,7 @@ public class DupsContainerCursor<K, V> e
      * @param element the tuple who's key is used to position this Cursor
      * @throws IOException if there are failures to position the Cursor
      */
-    public void before( Tuple<K, DupsContainer<V>> element ) throws Exception
+    public void before( Tuple<K, DupsContainer<V>> element ) throws LdapException, CursorException, IOException
     {
         beforeKey( element.getKey() );
     }
@@ -205,7 +206,7 @@ public class DupsContainerCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public void after( Tuple<K, DupsContainer<V>> element ) throws Exception
+    public void after( Tuple<K, DupsContainer<V>> element ) throws LdapException, CursorException, IOException
     {
         afterKey( element.getKey() );
     }
@@ -215,7 +216,7 @@ public class DupsContainerCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.closeBrowser( browser );
@@ -229,7 +230,7 @@ public class DupsContainerCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.closeBrowser( browser );
@@ -242,7 +243,7 @@ public class DupsContainerCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
 
@@ -253,7 +254,7 @@ public class DupsContainerCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
 
@@ -264,7 +265,7 @@ public class DupsContainerCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -315,7 +316,7 @@ public class DupsContainerCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java Tue Dec 18 06:28:48 2012
@@ -31,6 +31,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -90,7 +91,7 @@ class DupsCursor<K, V> extends AbstractC
     private boolean valueAvailable;
 
 
-    public DupsCursor( JdbmTable<K, V> table ) throws Exception
+    public DupsCursor( JdbmTable<K, V> table )
     {
         if ( IS_DEBUG )
         {
@@ -115,7 +116,7 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public void beforeValue( K key, V value ) throws Exception
+    public void beforeValue( K key, V value ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeValue()" );
         containerCursor.before( new Tuple<K, DupsContainer<V>>( key, null ) );
@@ -162,7 +163,7 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public void afterValue( K key, V value ) throws Exception
+    public void afterValue( K key, V value ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterValue()" );
         /*
@@ -231,19 +232,28 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public void before( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         beforeValue( element.getKey(), element.getValue() );
     }
 
 
-    public void after( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         afterValue( element.getKey(), element.getValue() );
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         clearValue();
@@ -254,7 +264,10 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         clearValue();
@@ -265,7 +278,10 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first()" );
         clearValue();
@@ -303,7 +319,10 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last()" );
         clearValue();
@@ -350,7 +369,10 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
         /*
@@ -408,7 +430,10 @@ class DupsCursor<K, V> extends AbstractC
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
         /*

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Tue Dec 18 06:28:48 2012
@@ -40,6 +40,8 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapOtherException;
 import org.apache.directory.shared.ldap.model.schema.AttributeType;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -352,7 +354,7 @@ public class JdbmIndex<K, V> extends Abs
     /**
      * {@inheritDoc}
      */
-    public K reverseLookup( String id ) throws Exception
+    public K reverseLookup( String id ) throws LdapException
     {
         if ( withReverse )
         {
@@ -454,7 +456,7 @@ public class JdbmIndex<K, V> extends Abs
 
 
     @SuppressWarnings("unchecked")
-    public Cursor<IndexEntry<K, String>> forwardCursor() throws Exception
+    public Cursor<IndexEntry<K, String>> forwardCursor() throws LdapException
     {
         return new IndexCursorAdaptor<K>( ( Cursor ) forward.cursor(), true );
     }
@@ -515,7 +517,7 @@ public class JdbmIndex<K, V> extends Abs
     /**
      * {@inheritDoc}
      */
-    public boolean forward( K attrVal, String id ) throws Exception
+    public boolean forward( K attrVal, String id ) throws LdapException
     {
         return forward.has( attrVal, id );
     }
@@ -601,7 +603,7 @@ public class JdbmIndex<K, V> extends Abs
     /**
      * {@inheritDoc}
      */
-    public boolean reverseGreaterOrEq( String id, K attrVal ) throws Exception
+    public boolean reverseGreaterOrEq( String id, K attrVal ) throws LdapException
     {
         if ( withReverse )
         {

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Tue Dec 18 06:28:48 2012
@@ -41,6 +41,8 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.model.cursor.SingletonCursor;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.shared.ldap.model.exception.LdapOtherException;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.model.schema.comparators.SerializableComparator;
 import org.apache.directory.shared.util.StringConstants;
@@ -265,33 +267,40 @@ public class JdbmTable<K, V> extends Abs
     /**
      * @see org.apache.directory.server.xdbm.Table#count(java.lang.Object)
      */
-    public int count( K key ) throws IOException
+    public int count( K key ) throws LdapException
     {
         if ( key == null )
         {
             return 0;
         }
 
-        if ( !allowsDuplicates )
-        {
-            if ( null == bt.find( key ) )
+        try
+        {      
+            if ( !allowsDuplicates )
             {
-                return 0;
+                if ( null == bt.find( key ) )
+                {
+                    return 0;
+                }
+                else
+                {
+                    return 1;
+                }
             }
-            else
+    
+            DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+    
+            if ( values.isArrayTree() )
             {
-                return 1;
+                return values.getArrayTree().size();
             }
+    
+            return getBTree( values.getBTreeRedirect() ).size();
         }
-
-        DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
-
-        if ( values.isArrayTree() )
+        catch ( IOException ioe )
         {
-            return values.getArrayTree().size();
+            throw new LdapOtherException( ioe.getMessage() );
         }
-
-        return getBTree( values.getBTreeRedirect() ).size();
     }
 
 
@@ -300,49 +309,57 @@ public class JdbmTable<K, V> extends Abs
     // ------------------------------------------------------------------------
 
     @SuppressWarnings("unchecked")
-    public V get( K key ) throws Exception
+    public V get( K key ) throws LdapException
     {
         if ( key == null )
         {
             return null;
         }
 
-        if ( !allowsDuplicates )
-        {
-            return bt.find( key );
-        }
-
-        DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
-
-        if ( values.isArrayTree() )
+        try
         {
-            ArrayTree<V> set = values.getArrayTree();
-
-            if ( set.getFirst() == null )
+            if ( !allowsDuplicates )
             {
-                return null;
+                return bt.find( key );
             }
-
-            return set.getFirst();
+    
+            DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+    
+            if ( values.isArrayTree() )
+            {
+                ArrayTree<V> set = values.getArrayTree();
+    
+                if ( set.getFirst() == null )
+                {
+                    return null;
+                }
+    
+                return set.getFirst();
+            }
+    
+            // Handle values if they are stored in another BTree
+            BTree tree = getBTree( values.getBTreeRedirect() );
+    
+            jdbm.helper.Tuple tuple = new jdbm.helper.Tuple();
+            TupleBrowser<K, V> browser = tree.browse();
+            browser.getNext( tuple );
+            this.closeBrowser( browser );
+            //noinspection unchecked
+    
+            return ( V ) tuple.getKey();
+        }
+        catch ( IOException ioe )
+        {
+            throw new LdapOtherException( ioe.getMessage() );
         }
 
-        // Handle values if they are stored in another BTree
-        BTree tree = getBTree( values.getBTreeRedirect() );
-
-        jdbm.helper.Tuple tuple = new jdbm.helper.Tuple();
-        TupleBrowser<K, V> browser = tree.browse();
-        browser.getNext( tuple );
-        this.closeBrowser( browser );
-        //noinspection unchecked
-
-        return ( V ) tuple.getKey();
     }
 
 
     /**
      * @see Table#hasGreaterOrEqual(Object,Object)
      */
-    public boolean hasGreaterOrEqual( K key, V val ) throws IOException
+    public boolean hasGreaterOrEqual( K key, V val ) throws LdapException
     {
         if ( key == null )
         {
@@ -354,26 +371,33 @@ public class JdbmTable<K, V> extends Abs
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_593 ) );
         }
 
-        DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
-
-        if ( values.isArrayTree() )
+        try
         {
-            ArrayTree<V> set = values.getArrayTree();
-            V result = set.findGreaterOrEqual( val );
-            return result != null;
+            DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+    
+            if ( values.isArrayTree() )
+            {
+                ArrayTree<V> set = values.getArrayTree();
+                V result = set.findGreaterOrEqual( val );
+                return result != null;
+            }
+    
+            // last option is to try a btree with BTreeRedirects
+            BTree<K, V> tree = getBTree( values.getBTreeRedirect() );
+    
+            return tree.size() != 0 && btreeHas( tree, val, true );
+        }
+        catch ( IOException ioe )
+        {
+            throw new LdapOtherException( ioe.getMessage() );
         }
-
-        // last option is to try a btree with BTreeRedirects
-        BTree<K, V> tree = getBTree( values.getBTreeRedirect() );
-
-        return tree.size() != 0 && btreeHas( tree, val, true );
     }
 
 
     /**
      * @see Table#hasLessOrEqual(Object,Object)
      */
-    public boolean hasLessOrEqual( K key, V val ) throws IOException
+    public boolean hasLessOrEqual( K key, V val ) throws LdapException
     {
         if ( key == null )
         {
@@ -385,19 +409,26 @@ public class JdbmTable<K, V> extends Abs
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_593 ) );
         }
 
-        DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
-
-        if ( values.isArrayTree() )
+        try
         {
-            ArrayTree<V> set = values.getArrayTree();
-            V result = set.findLessOrEqual( val );
-            return result != null;
+            DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+    
+            if ( values.isArrayTree() )
+            {
+                ArrayTree<V> set = values.getArrayTree();
+                V result = set.findLessOrEqual( val );
+                return result != null;
+            }
+    
+            // last option is to try a btree with BTreeRedirects
+            BTree<K, V> tree = getBTree( values.getBTreeRedirect() );
+    
+            return tree.size() != 0 && btreeHas( tree, val, false );
+        }
+        catch ( IOException ioe )
+        {
+            throw new LdapOtherException( ioe.getMessage() );
         }
-
-        // last option is to try a btree with BTreeRedirects
-        BTree<K, V> tree = getBTree( values.getBTreeRedirect() );
-
-        return tree.size() != 0 && btreeHas( tree, val, false );
     }
 
 
@@ -484,27 +515,34 @@ public class JdbmTable<K, V> extends Abs
      * java.lang.Object)
      */
     @SuppressWarnings("unchecked")
-    public boolean has( K key, V value ) throws IOException
+    public boolean has( K key, V value ) throws LdapException
     {
         if ( key == null )
         {
             return false;
         }
 
-        if ( !allowsDuplicates )
+        try
         {
-            V stored = bt.find( key );
-            return null != stored && stored.equals( value );
-        }
-
-        DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+            if ( !allowsDuplicates )
+            {
+                V stored = bt.find( key );
+                return null != stored && stored.equals( value );
+            }
 
-        if ( values.isArrayTree() )
+            DupsContainer<V> values = getDupsContainer( ( byte[] ) bt.find( key ) );
+    
+            if ( values.isArrayTree() )
+            {
+                return values.getArrayTree().find( value ) != null;
+            }
+    
+            return getBTree( values.getBTreeRedirect() ).find( value ) != null;
+        }
+        catch ( IOException ioe )
         {
-            return values.getArrayTree().find( value ) != null;
+            throw new LdapOtherException( ioe.getMessage() );
         }
-
-        return getBTree( values.getBTreeRedirect() ).find( value ) != null;
     }
 
 
@@ -805,7 +843,7 @@ public class JdbmTable<K, V> extends Abs
     }
 
 
-    public Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K, V>> cursor() throws Exception
+    public Cursor<org.apache.directory.shared.ldap.model.cursor.Tuple<K, V>> cursor() throws LdapException
     {
         if ( allowsDuplicates )
         {
@@ -945,7 +983,7 @@ public class JdbmTable<K, V> extends Abs
     }
 
 
-    DupsContainer<V> getDupsContainer( byte[] serialized ) throws IOException
+    DupsContainer<V> getDupsContainer( byte[] serialized ) throws LdapException
     {
         if ( serialized == null )
         {
@@ -954,10 +992,25 @@ public class JdbmTable<K, V> extends Abs
 
         if ( BTreeRedirectMarshaller.isRedirect( serialized ) )
         {
-            return new DupsContainer<V>( BTreeRedirectMarshaller.INSTANCE.deserialize( serialized ) );
+            try
+            {
+                return new DupsContainer<V>( BTreeRedirectMarshaller.INSTANCE.deserialize( serialized ) );
+            }
+            catch ( IOException ioe )
+            {
+                throw new LdapOtherException( ioe.getMessage() );
+            }
+
         }
 
-        return new DupsContainer<V>( marshaller.deserialize( serialized ) );
+        try
+        {
+            return new DupsContainer<V>( marshaller.deserialize( serialized ) );
+        }
+        catch ( IOException ioe )
+        {
+            throw new LdapOtherException( ioe.getMessage() );
+        }
     }
 
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java Tue Dec 18 06:28:48 2012
@@ -29,6 +29,7 @@ import jdbm.helper.TupleBrowser;
 import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,7 +63,7 @@ public class KeyBTreeCursor<E> extends A
      * @param comparator the Comparator used to determine key ordering
      * @throws Exception of there are problems accessing the BTree
      */
-    public KeyBTreeCursor( BTree btree, Comparator<E> comparator ) throws Exception
+    public KeyBTreeCursor( BTree btree, Comparator<E> comparator )
     {
         if ( IS_DEBUG )
         {
@@ -88,7 +89,10 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
-    public void before( E element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
         this.closeBrowser( browser );
@@ -97,8 +101,11 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     @SuppressWarnings("unchecked")
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         this.closeBrowser( browser );
         browser = btree.browse( element );
@@ -139,7 +146,10 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.closeBrowser( browser );
@@ -148,7 +158,10 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.closeBrowser( browser );
@@ -156,21 +169,30 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
         return next();
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
         return previous();
     }
 
 
-    public boolean previous() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -191,7 +213,10 @@ public class KeyBTreeCursor<E> extends A
     }
 
 
-    public boolean next() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java Tue Dec 18 06:28:48 2012
@@ -30,6 +30,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -133,7 +134,7 @@ public class KeyTupleBTreeCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void afterValue( K key, V value ) throws Exception
+    public void afterValue( K key, V value ) throws LdapException, CursorException, IOException
     {
         if ( key != null && !key.equals( this.key ) )
         {
@@ -190,7 +191,7 @@ public class KeyTupleBTreeCursor<K, V> e
      * @param element the valueTuple who's value is used to position this Cursor
      * @throws Exception if there are failures to position the Cursor
      */
-    public void before( Tuple<K, V> element ) throws Exception
+    public void before( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
         this.closeBrowser( browser );
@@ -202,7 +203,7 @@ public class KeyTupleBTreeCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public void after( Tuple<K, V> element ) throws Exception
+    public void after( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         afterValue( key, element.getValue() );
     }
@@ -211,7 +212,7 @@ public class KeyTupleBTreeCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.closeBrowser( browser );
@@ -223,7 +224,7 @@ public class KeyTupleBTreeCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.closeBrowser( browser );
@@ -234,7 +235,7 @@ public class KeyTupleBTreeCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
 
@@ -245,7 +246,7 @@ public class KeyTupleBTreeCursor<K, V> e
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
 
@@ -257,7 +258,7 @@ public class KeyTupleBTreeCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -287,7 +288,7 @@ public class KeyTupleBTreeCursor<K, V> e
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java Tue Dec 18 06:28:48 2012
@@ -28,6 +28,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.cursor.CursorException;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,7 +63,7 @@ class NoDupsCursor<K, V> extends Abstrac
      * @param table the JDBM Table to build a Cursor over
      * @throws IOException of there are problems accessing the BTree
      */
-    public NoDupsCursor( JdbmTable<K, V> table ) throws IOException
+    public NoDupsCursor( JdbmTable<K, V> table )
     {
         if ( IS_DEBUG )
         {
@@ -89,7 +90,7 @@ class NoDupsCursor<K, V> extends Abstrac
     }
 
 
-    public void beforeKey( K key ) throws Exception
+    public void beforeKey( K key ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeKey()" );
         this.closeBrowser( browser );
@@ -99,7 +100,7 @@ class NoDupsCursor<K, V> extends Abstrac
 
 
     @SuppressWarnings("unchecked")
-    public void afterKey( K key ) throws Exception
+    public void afterKey( K key ) throws LdapException, CursorException, IOException
     {
         this.closeBrowser( browser );
         browser = table.getBTree().browse( key );
@@ -148,19 +149,25 @@ class NoDupsCursor<K, V> extends Abstrac
      * @param element the tuple who's key is used to position this Cursor
      * @throws IOException if there are failures to position the Cursor
      */
-    public void before( Tuple<K, V> element ) throws Exception
+    public void before( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         beforeKey( element.getKey() );
     }
 
 
-    public void after( Tuple<K, V> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( Tuple<K, V> element ) throws LdapException, CursorException, IOException
     {
         afterKey( element.getKey() );
     }
 
 
-    public void beforeFirst() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.closeBrowser( browser );
@@ -169,7 +176,10 @@ class NoDupsCursor<K, V> extends Abstrac
     }
 
 
-    public void afterLast() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.closeBrowser( browser );
@@ -178,22 +188,31 @@ class NoDupsCursor<K, V> extends Abstrac
     }
 
 
-    public boolean first() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean first() throws LdapException, CursorException, IOException
     {
         beforeFirst();
         return next();
     }
 
 
-    public boolean last() throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public boolean last() throws LdapException, CursorException, IOException
     {
         afterLast();
         return previous();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     @SuppressWarnings("unchecked")
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
         if ( browser == null )
@@ -221,8 +240,11 @@ class NoDupsCursor<K, V> extends Abstrac
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     @SuppressWarnings("unchecked")
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java?rev=1423287&r1=1423286&r2=1423287&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicaEventMessage.java Tue Dec 18 06:28:48 2012
@@ -24,6 +24,7 @@ package org.apache.directory.server.ldap
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.Entry;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 
 
@@ -85,7 +86,7 @@ public class ReplicaEventMessage
      * @return true if the event's CSN is older than the given CSN
      * @throws Exception if there are any extreme conditions like a null entry or missing entryCSN attribute.
      */
-    public boolean isEventOlderThan( String csn ) throws Exception
+    public boolean isEventOlderThan( String csn ) throws LdapException
     {
         if ( csn == null )
         {



Mime
View raw message