directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1592319 - in /directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree: MavibotInspector.java RecordManager.java
Date Sun, 04 May 2014 08:29:58 GMT
Author: elecharny
Date: Sun May  4 08:29:58 2014
New Revision: 1592319

URL: http://svn.apache.org/r1592319
Log:
Added some extra tests

Modified:
    directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java
    directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java

Modified: directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java?rev=1592319&r1=1592318&r2=1592319&view=diff
==============================================================================
--- directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java
(original)
+++ directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/MavibotInspector.java
Sun May  4 08:29:58 2014
@@ -206,7 +206,7 @@ public class MavibotInspector
             // The page size. It must be a power of 2, and above 16.
             int pageSize = recordManagerHeader.getInt();
 
-            if ( ( pageSize < 0 ) || ( pageSize < 32 ) || ( ( pageSize & ( ~pageSize
+ 1 ) ) != pageSize ) )
+            if ( ( pageSize != recordManager.pageSize ) || ( pageSize < 32 ) || ( ( pageSize
& ( ~pageSize + 1 ) ) != pageSize ) )
             {
                 throw new InvalidBTreeException( "Wrong page size : " + pageSize );
             }
@@ -217,7 +217,7 @@ public class MavibotInspector
             // The number of trees. It must be at least 2 and > 0
             int nbBtrees = recordManagerHeader.getInt();
 
-            if ( nbBtrees < 0 )
+            if ( ( nbBtrees < 0 ) || ( nbBtrees != recordManager.nbBtree ) )
             {
                 throw new InvalidBTreeException( "Wrong nb trees : " + nbBtrees );
             }

Modified: directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java?rev=1592319&r1=1592318&r2=1592319&view=diff
==============================================================================
--- directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
(original)
+++ directory/mavibot/branches/with-txns/mavibot/src/main/java/org/apache/directory/mavibot/btree/RecordManager.java
Sun May  4 08:29:58 2014
@@ -83,7 +83,7 @@ public class RecordManager extends Abstr
     /* no qualifier */ FileChannel fileChannel;
 
     /** The number of managed B-trees */
-    private int nbBtree;
+    /* no qualifier */ int nbBtree;
 
     /** The first and last free page */
     /* no qualifier */ long firstFreePage;



Mime
View raw message