directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1423288 - in /directory/shared/trunk/ldap: client/api/src/main/java/org/apache/directory/ldap/client/api/ model/src/main/java/org/apache/directory/shared/ldap/model/cursor/
Date Tue, 18 Dec 2012 06:32:07 GMT
Author: elecharny
Date: Tue Dec 18 06:32:05 2012
New Revision: 1423288

URL: http://svn.apache.org/viewvc?rev=1423288&view=rev
Log:
Totally forgot to commit the changes in Shared : the Cursor method now throw LdapException,
CursorEception or IOException, instead of Exception

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/Cursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EmptyCursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/ListCursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SetCursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SingletonCursor.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
Tue Dec 18 06:32:05 2012
@@ -83,7 +83,7 @@ public class EntryCursorImpl extends Abs
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         if ( !searchCursor.next() )
         {
@@ -211,7 +211,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void after( Entry element ) throws Exception
+    public void after( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "after( Response element )" ) ) );
@@ -222,7 +222,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "afterLast()" ) ) );
@@ -233,7 +233,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void before( Entry element ) throws Exception
+    public void before( Entry element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "before( Response element )" ) ) );
@@ -244,7 +244,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "beforeFirst()" ) ) );
@@ -255,7 +255,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "first()" ) ) );
@@ -266,7 +266,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "last()" ) ) );
@@ -277,7 +277,7 @@ public class EntryCursorImpl extends Abs
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "previous()" ) ) );

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
Tue Dec 18 06:32:05 2012
@@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.directory.ldap.client.api.future.SearchFuture;
 import org.apache.directory.shared.i18n.I18n;
 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.cursor.SearchCursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -98,7 +99,7 @@ public class SearchCursorImpl extends Ab
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         if ( done )
         {
@@ -237,7 +238,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void after( Response element ) throws Exception
+    public void after( Response element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "after( Response element )" ) ) );
@@ -248,7 +249,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "afterLast()" ) ) );
@@ -259,7 +260,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void before( Response element ) throws Exception
+    public void before( Response element ) throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "before( Response element )" ) ) );
@@ -270,7 +271,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "beforeFirst()" ) ) );
@@ -281,7 +282,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "first()" ) ) );
@@ -292,7 +293,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "last()" ) ) );
@@ -303,7 +304,7 @@ public class SearchCursorImpl extends Ab
      * This operation is not supported in SearchCursor.
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "previous()" ) ) );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
Tue Dec 18 06:32:05 2012
@@ -101,7 +101,7 @@ public abstract class AbstractCursor<E> 
     /**
      * {@inheritDoc}
      */
-    public boolean isAfterLast() throws Exception
+    public boolean isAfterLast()
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isAfterLast()" ) ) );
@@ -111,7 +111,7 @@ public abstract class AbstractCursor<E> 
     /**
      * {@inheritDoc}
      */
-    public boolean isBeforeFirst() throws Exception
+    public boolean isBeforeFirst()
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isBeforeFirst()" ) ) );
@@ -121,7 +121,7 @@ public abstract class AbstractCursor<E> 
     /**
      * {@inheritDoc}
      */
-    public boolean isFirst() throws Exception
+    public boolean isFirst()
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isFirst()" ) ) );
@@ -131,7 +131,7 @@ public abstract class AbstractCursor<E> 
     /**
      * {@inheritDoc}
      */
-    public boolean isLast() throws Exception
+    public boolean isLast()
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_02014_UNSUPPORTED_OPERATION,
getClass().getName()
             .concat( "." ).concat( "isLast()" ) ) );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/Cursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/Cursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/Cursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/Cursor.java
Tue Dec 18 06:32:05 2012
@@ -20,6 +20,8 @@ package org.apache.directory.shared.ldap
 
 import java.io.IOException;
 
+import org.apache.directory.shared.ldap.model.exception.LdapException;
+
 
 /**
  * A Cursor for bidirectional traversal over elements in a dataSet. Cursors
@@ -64,7 +66,7 @@ public interface Cursor<E> extends Itera
      * @param element the element to be positioned before
      * @throws Exception with problems accessing the underlying btree
      */
-    void before( E element ) throws Exception;
+    void before( E element ) throws LdapException, CursorException, IOException;
 
 
     /**
@@ -82,7 +84,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems positioning this cursor or if
      * this Cursor is closed
      */
-    void after( E element ) throws Exception;
+    void after( E element ) throws LdapException, CursorException, IOException;
 
 
     /**
@@ -91,7 +93,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems positioning this cursor or if
      * this Cursor is closed
      */
-    void beforeFirst() throws Exception;
+    void beforeFirst() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -100,7 +102,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
      */
-    void afterLast() throws Exception;
+    void afterLast() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -111,7 +113,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
      */
-    boolean first() throws Exception;
+    boolean first() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -122,7 +124,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
      */
-    boolean isFirst() throws Exception;
+    boolean isFirst();
 
 
     /**
@@ -133,7 +135,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
      */
-    boolean isBeforeFirst() throws Exception;
+    boolean isBeforeFirst();
 
 
     /**
@@ -144,7 +146,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems positioning this Cursor or if
      * this Cursor is closed
      */
-    boolean last() throws Exception;
+    boolean last() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -155,7 +157,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
      */
-    boolean isLast() throws Exception;
+    boolean isLast();
 
 
     /**
@@ -166,7 +168,7 @@ public interface Cursor<E> extends Itera
      * @throws Exception if there are problems querying the position of this Cursor
      * or if this Cursor is closed
      */
-    boolean isAfterLast() throws Exception;
+    boolean isAfterLast();
 
 
     /**
@@ -187,7 +189,7 @@ public interface Cursor<E> extends Itera
      * @return true if the advance succeeded, false otherwise
      * @throws Exception if there are problems advancing to the next position
      */
-    boolean previous() throws Exception;
+    boolean previous() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -197,10 +199,13 @@ public interface Cursor<E> extends Itera
      * the first element.
      *
      * @return true if the advance succeeded, false otherwise
-     * @throws Exception if there are problems advancing to this Cursor to
-     * the next position, or if this Cursor is closed
+     * @throws LdapException if we have get any LDAP exception while operating
+     * the cursor
+     * @throws CursorException if there are problems advancing to this Cursor to
+     * the next position, or if this Cursor is closed 
+     * @throws IOException If we have had any IO Exception
      */
-    boolean next() throws Exception;
+    boolean next() throws LdapException, CursorException, IOException;
 
 
     /**
@@ -211,6 +216,7 @@ public interface Cursor<E> extends Itera
      * @return the object at the current position
      * @throws CursorException if the object at this Cursor's current position
      * cannot be retrieved, or if this Cursor is closed
+     * @throws IOException If we have had any IO Exception
      */
     E get() throws CursorException, IOException;
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EmptyCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EmptyCursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EmptyCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/EmptyCursor.java
Tue Dec 18 06:32:05 2012
@@ -22,6 +22,7 @@ package org.apache.directory.shared.ldap
 import java.io.IOException;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -60,7 +61,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public void before( E element ) throws Exception
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
     }
@@ -69,7 +70,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after()" );
     }
@@ -78,7 +79,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
     }
@@ -87,7 +88,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
     }
@@ -96,7 +97,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first()" );
         return false;
@@ -106,7 +107,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last()" );
         return false;
@@ -116,7 +117,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
         return false;
@@ -126,7 +127,7 @@ public class EmptyCursor<E> extends Abst
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
         return false;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/ListCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/ListCursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/ListCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/ListCursor.java
Tue Dec 18 06:32:05 2012
@@ -25,6 +25,7 @@ import java.util.Comparator;
 import java.util.List;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -245,7 +246,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public void before( E element ) throws Exception
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
 
@@ -278,7 +279,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after()" );
 
@@ -311,7 +312,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.index = -1;
@@ -321,7 +322,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.index = end;
@@ -331,7 +332,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first()" );
 
@@ -349,7 +350,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last()" );
 
@@ -368,10 +369,8 @@ public class ListCursor<E> extends Abstr
      * {@inheritDoc}
      */
     @Override
-    public boolean isFirst() throws Exception
+    public boolean isFirst()
     {
-        checkNotClosed( "isFirst()" );
-
         return list.size() > 0 && index == start;
     }
 
@@ -380,10 +379,8 @@ public class ListCursor<E> extends Abstr
      * {@inheritDoc}
      */
     @Override
-    public boolean isLast() throws Exception
+    public boolean isLast()
     {
-        checkNotClosed( "isLast()" );
-
         return list.size() > 0 && index == end - 1;
     }
 
@@ -392,9 +389,8 @@ public class ListCursor<E> extends Abstr
      * {@inheritDoc}
      */
     @Override
-    public boolean isAfterLast() throws Exception
+    public boolean isAfterLast()
     {
-        checkNotClosed( "isAfterLast()" );
         return index == end;
     }
 
@@ -403,9 +399,8 @@ public class ListCursor<E> extends Abstr
      * {@inheritDoc}
      */
     @Override
-    public boolean isBeforeFirst() throws Exception
+    public boolean isBeforeFirst()
     {
-        checkNotClosed( "isBeforeFirst()" );
         return index == -1;
     }
 
@@ -413,7 +408,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -451,7 +446,7 @@ public class ListCursor<E> extends Abstr
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SetCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SetCursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SetCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SetCursor.java
Tue Dec 18 06:32:05 2012
@@ -25,6 +25,7 @@ import java.util.Comparator;
 import java.util.Set;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -130,7 +131,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public void before( E element ) throws Exception
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
 
@@ -163,7 +164,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after()" );
 
@@ -196,7 +197,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst()" );
         this.index = -1;
@@ -206,7 +207,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast()" );
         this.index = set.length;
@@ -216,7 +217,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first()" );
 
@@ -234,7 +235,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last()" );
 
@@ -253,10 +254,8 @@ public class SetCursor<E> extends Abstra
      * {@inheritDoc}
      */
     @Override
-    public boolean isFirst() throws Exception
+    public boolean isFirst()
     {
-        checkNotClosed( "isFirst()" );
-
         return ( set.length > 0 ) && ( index == 0 );
     }
 
@@ -265,10 +264,8 @@ public class SetCursor<E> extends Abstra
      * {@inheritDoc}
      */
     @Override
-    public boolean isLast() throws Exception
+    public boolean isLast()
     {
-        checkNotClosed( "isLast()" );
-
         return ( set.length > 0 ) && ( index == set.length - 1 );
     }
 
@@ -277,9 +274,8 @@ public class SetCursor<E> extends Abstra
      * {@inheritDoc}
      */
     @Override
-    public boolean isAfterLast() throws Exception
+    public boolean isAfterLast()
     {
-        checkNotClosed( "isAfterLast()" );
         return index == set.length;
     }
 
@@ -288,9 +284,8 @@ public class SetCursor<E> extends Abstra
      * {@inheritDoc}
      */
     @Override
-    public boolean isBeforeFirst() throws Exception
+    public boolean isBeforeFirst()
     {
-        checkNotClosed( "isBeforeFirst()" );
         return index == -1;
     }
 
@@ -298,7 +293,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous()" );
 
@@ -336,7 +331,7 @@ public class SetCursor<E> extends Abstra
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next()" );
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SingletonCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SingletonCursor.java?rev=1423288&r1=1423287&r2=1423288&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SingletonCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/SingletonCursor.java
Tue Dec 18 06:32:05 2012
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.util.Comparator;
 
 import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -99,7 +100,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void before( E element ) throws Exception
+    public void before( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "before()" );
 
@@ -124,7 +125,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void after( E element ) throws Exception
+    public void after( E element ) throws LdapException, CursorException, IOException
     {
         checkNotClosed( "after()" );
 
@@ -149,7 +150,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void beforeFirst() throws Exception
+    public void beforeFirst() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "beforeFirst" );
         beforeFirst = true;
@@ -161,7 +162,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public void afterLast() throws Exception
+    public void afterLast() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "afterLast" );
         beforeFirst = false;
@@ -173,7 +174,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean first() throws Exception
+    public boolean first() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "first" );
         beforeFirst = false;
@@ -187,7 +188,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean last() throws Exception
+    public boolean last() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "last" );
         beforeFirst = false;
@@ -202,10 +203,8 @@ public class SingletonCursor<E> extends 
      * {@inheritDoc}
      */
     @Override
-    public boolean isFirst() throws Exception
+    public boolean isFirst()
     {
-        checkNotClosed( "isFirst" );
-
         return onSingleton;
     }
 
@@ -214,10 +213,8 @@ public class SingletonCursor<E> extends 
      * {@inheritDoc}
      */
     @Override
-    public boolean isLast() throws Exception
+    public boolean isLast()
     {
-        checkNotClosed( "isLast" );
-
         return onSingleton;
     }
 
@@ -226,10 +223,8 @@ public class SingletonCursor<E> extends 
      * {@inheritDoc}
      */
     @Override
-    public boolean isAfterLast() throws Exception
+    public boolean isAfterLast()
     {
-        checkNotClosed( "isAfterLast" );
-
         return afterLast;
     }
 
@@ -238,10 +233,8 @@ public class SingletonCursor<E> extends 
      * {@inheritDoc}
      */
     @Override
-    public boolean isBeforeFirst() throws Exception
+    public boolean isBeforeFirst()
     {
-        checkNotClosed( "isBeforeFirst" );
-
         return beforeFirst;
     }
 
@@ -249,7 +242,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean previous() throws Exception
+    public boolean previous() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "previous" );
 
@@ -279,7 +272,7 @@ public class SingletonCursor<E> extends 
     /**
      * {@inheritDoc}
      */
-    public boolean next() throws Exception
+    public boolean next() throws LdapException, CursorException, IOException
     {
         checkNotClosed( "next" );
 



Mime
View raw message