You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by br...@apache.org on 2002/02/15 02:41:40 UTC
cvs commit: xml-xindice/java/src/org/apache/xindice/core/filer BTree.java
bradford 02/02/14 17:41:40
Modified: java/src/org/apache/xindice/core/filer BTree.java
Log:
Fixed a nasty bug in BTree that caused the root node to not be written
properly
Revision Changes Path
1.3 +3 -1 xml-xindice/java/src/org/apache/xindice/core/filer/BTree.java
Index: BTree.java
===================================================================
RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/filer/BTree.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BTree.java 15 Jan 2002 17:22:23 -0000 1.2
+++ BTree.java 15 Feb 2002 01:41:40 -0000 1.3
@@ -56,7 +56,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
- * $Id: BTree.java,v 1.2 2002/01/15 17:22:23 bradford Exp $
+ * $Id: BTree.java,v 1.3 2002/02/15 01:41:40 bradford Exp $
*/
import org.apache.xindice.core.*;
@@ -131,6 +131,7 @@
public boolean create() throws DBException {
if ( super.create() ) {
try {
+ open();
long p = fileHeader.getRootPage();
rootInfo = new BTreeRootInfo(p);
rootNode = new BTreeNode(rootInfo, getPage(p));
@@ -138,6 +139,7 @@
rootNode.setValues(new Value[0]);
rootNode.setPointers(new long[0]);
rootNode.write();
+ close();
return true;
}
catch ( Exception e ) {