directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r640542 - in /directory/sandbox/akarasulu/bigbang/apacheds: core-cursor/src/main/java/org/apache/directory/server/core/cursor/ jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-tools/
Date Mon, 24 Mar 2008 19:45:05 GMT
Author: akarasulu
Date: Mon Mar 24 12:45:03 2008
New Revision: 640542

URL: http://svn.apache.org/viewvc?rev=640542&view=rev
Log:
fix bug with IteratorCursor

Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/core-cursor/src/main/java/org/apache/directory/server/core/cursor/CursorIterator.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/   (props changed)

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-cursor/src/main/java/org/apache/directory/server/core/cursor/CursorIterator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-cursor/src/main/java/org/apache/directory/server/core/cursor/CursorIterator.java?rev=640542&r1=640541&r2=640542&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-cursor/src/main/java/org/apache/directory/server/core/cursor/CursorIterator.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-cursor/src/main/java/org/apache/directory/server/core/cursor/CursorIterator.java
Mon Mar 24 12:45:03 2008
@@ -32,18 +32,20 @@
  */
 public class CursorIterator<E> implements Iterator<E>
 {
-    private Cursor<E> cursor;
+    private final Cursor<E> cursor;
+    private boolean available;
 
 
     public CursorIterator( Cursor cursor )
     {
         this.cursor = cursor;
+        this.available = cursor.available();
     }
 
 
     public boolean hasNext()
     {
-        return cursor.available();
+        return available;
     }
 
 
@@ -52,7 +54,7 @@
         try
         {
             E element = cursor.get();
-            cursor.next();
+            available = cursor.next();
             return element;
         }
         catch ( Exception e )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=640542&r1=640541&r2=640542&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Mon Mar 24 12:45:03 2008
@@ -331,7 +331,7 @@
         assertNull( store.getParentId( 0L ) );
 
         // should not be allowed
-xxx        try { store.delete( 1L ); fail(); } catch( LdapOperationNotSupportedException
e )
+        try { store.delete( 1L ); fail(); } catch( LdapOperationNotSupportedException e )
         {
             assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, e.getResultCode() );
         }

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar 24 12:45:03 2008
@@ -0,0 +1,17 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+nbproject
+schema
+



Mime
View raw message