directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1214111 - /directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java
Date Wed, 14 Dec 2011 08:42:44 GMT
Author: saya
Date: Wed Dec 14 08:42:44 2011
New Revision: 1214111

URL: http://svn.apache.org/viewvc?rev=1214111&view=rev
Log:
fixed a bug with cursor positioning

Modified:
    directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java

Modified: directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java?rev=1214111&r1=1214110&r2=1214111&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-avl/src/main/java/org/apache/directory/server/core/avltree/ConcurrentMapCursor.java
Wed Dec 14 08:42:44 2011
@@ -66,6 +66,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public Tuple<K,V> get() throws Exception
     {
+        checkNotClosed( "get" );
+        
         if ( availableKey != null )
         {
             return returnedTuple;
@@ -88,7 +90,7 @@ public class ConcurrentMapCursor<K,V> ex
      * {@inheritDoc}
      */
     public void before( Tuple<K,V> element ) throws Exception
-    {
+    {   
         beforeKey( element.getKey() );   
     }
     
@@ -98,6 +100,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public void afterKey( K key ) throws Exception
     {
+        checkNotClosed( "afterKey" );
+        
         availableKey = null;
         positioned = true;
         movingNext = true;
@@ -119,6 +123,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public void beforeKey( K key ) throws Exception
     {
+        checkNotClosed( "beforeKey" );
+        
         availableKey = null;
         positioned = true;
         movingNext = true;
@@ -157,6 +163,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public void beforeFirst() throws Exception
     {
+        checkNotClosed( "beforeFirst" );
+        
         positioned = true;
         availableKey = null;
         movingNext = true;
@@ -170,6 +178,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public void afterLast() throws Exception
     {
+        checkNotClosed( "afterLast" );
+        
         positioned = true;
         availableKey = null;
         movingNext = false;
@@ -206,6 +216,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public boolean previous() throws Exception
     {
+        checkNotClosed( "previous" );
+        
         if ( positioned == false )
         {
             afterLast();
@@ -262,6 +274,8 @@ public class ConcurrentMapCursor<K,V> ex
      */
     public boolean next() throws Exception
     {
+        checkNotClosed( "next" );
+        
         if ( positioned == false )
         {
             beforeFirst();



Mime
View raw message