directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r613465 [2/2] - in /directory/sandbox/akarasulu/bigbang/apacheds: btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core-cursor/src/main/java/org/apache/directory/server/core/cursor/ core-cursor/src/test/java/o...
Date Sat, 19 Jan 2008 21:49:28 GMT
Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=613465&r1=613464&r2=613465&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Sat Jan 19 13:49:26 2008
@@ -56,7 +56,6 @@
 import javax.naming.directory.DirContext;
 import javax.naming.directory.ModificationItem;
 import java.io.File;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -83,7 +82,7 @@
     /** the working directory to use for files */
     private File workingDirectory;
     /** the master table storing entries by primary key */
-    private JdbmMasterTable master;
+    private JdbmMasterTable<Attributes> master;
     /** a map of attributeType numeric ids to user userIndices */
     private Map<String, JdbmIndex> userIndices = new HashMap<String, JdbmIndex>();
     /** a map of attributeType numeric ids to system userIndices */
@@ -272,10 +271,10 @@
      * @param oidRegistry an OID registry to resolve numeric identifiers from names
      * @param attributeTypeRegistry an attributeType specification registry to lookup type
specs
      * @throws NamingException on failure to lookup elements in registries
-     * @throws IOException on failure to create database files
+     * @throws Exception on failure to create database files
      */
     public synchronized void init( OidRegistry oidRegistry, AttributeTypeRegistry attributeTypeRegistry
)
-            throws IOException, NamingException
+            throws Exception
     {
         this.oidRegistry = oidRegistry;
         this.attributeTypeRegistry = attributeTypeRegistry;
@@ -287,42 +286,33 @@
         this.normSuffix = LdapDN.normalize( upSuffix, attributeTypeRegistry.getNormalizerMapping()
);
         workingDirectory.mkdirs();
 
-        try
-        {
-        	// First, check if the file storing the data exists
-            String path = workingDirectory.getPath() + File.separator + "master";
-            BaseRecordManager base = new BaseRecordManager( path );
-            base.disableTransactions();
+        // First, check if the file storing the data exists
+        String path = workingDirectory.getPath() + File.separator + "master";
+        BaseRecordManager base = new BaseRecordManager( path );
+        base.disableTransactions();
 
-            if ( cacheSize < 0 )
-            {
-                cacheSize = DEFAULT_CACHE_SIZE;
+        if ( cacheSize < 0 )
+        {
+            cacheSize = DEFAULT_CACHE_SIZE;
 
-                if ( LOG.isDebugEnabled() )
-                {
-	                LOG.debug( "Using the default entry cache size of {} for {} partition",
cacheSize, name );
-                }
-            }
-            else
+            if ( LOG.isDebugEnabled() )
             {
-            	if ( LOG.isDebugEnabled() )
-            	{
-	                LOG.debug( "Using the custom configured cache size of {} for {} partition",
cacheSize, name );
-            	}
+                LOG.debug( "Using the default entry cache size of {} for {} partition", cacheSize,
name );
             }
-
-            // Now, create the entry cache for this partition
-            recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
         }
-        catch ( IOException e )
+        else
         {
-            NamingException ne = new NamingException( "Could not initialize RecordManager"
);
-            ne.setRootCause( e );
-            throw ne;
+            if ( LOG.isDebugEnabled() )
+            {
+                LOG.debug( "Using the custom configured cache size of {} for {} partition",
cacheSize, name );
+            }
         }
 
+        // Now, create the entry cache for this partition
+        recMan = new CacheRecordManager( base, new MRU( cacheSize ) );
+
         // Create the master table (the table wcontaining all the entries)
-        master = new JdbmMasterTable( recMan );
+        master = new JdbmMasterTable<Attributes>( recMan );
 
         // -------------------------------------------------------------------
         // Initializes the user and system indices
@@ -337,7 +327,7 @@
     }
 
 
-    private void setupSystemIndices() throws NamingException, IOException
+    private void setupSystemIndices() throws Exception
     {
         if ( systemIndices.size() > 0 )
         {
@@ -409,7 +399,7 @@
     }
 
 
-    private void setupUserIndices() throws NamingException, IOException
+    private void setupUserIndices() throws Exception
     {
         if ( userIndices != null && userIndices.size() > 0 )
         {
@@ -436,9 +426,9 @@
      * @param suffix the suffix for the store
      * @param entry the root entry of the store
      * @throws NamingException on failre to add the root entry
-     * @throws IOException failure to access btrees
+     * @throws Exception failure to access btrees
      */
-    protected void initSuffixEntry3( String suffix, Attributes entry ) throws NamingException,
IOException
+    protected void initSuffixEntry3( String suffix, Attributes entry ) throws Exception
     {
         // add entry for context, if it does not exist
         Attributes suffixOnDisk = getSuffixEntry();
@@ -554,9 +544,9 @@
      * This method is called when the synch thread is waking up, to write
      * the modified data.
      * 
-     * @throws IOException on failures to sync database files to disk
+     * @throws Exception on failures to sync database files to disk
      */
-    public synchronized void sync() throws IOException
+    public synchronized void sync() throws Exception
     {
         if ( !initialized )
         {
@@ -792,45 +782,45 @@
     }
 
 
-    public Long getEntryId( String dn ) throws IOException
+    public Long getEntryId( String dn ) throws Exception
     {
         return ndnIdx.forwardLookup( dn );
     }
 
 
-    public String getEntryDn( Long id ) throws IOException
+    public String getEntryDn( Long id ) throws Exception
     {
         return ndnIdx.reverseLookup( id );
     }
 
 
-    public Long getParentId( String dn ) throws IOException
+    public Long getParentId( String dn ) throws Exception
     {
         Long childId = ndnIdx.forwardLookup( dn );
         return hierarchyIdx.reverseLookup( childId );
     }
 
 
-    public Long getParentId( Long childId ) throws IOException
+    public Long getParentId( Long childId ) throws Exception
     {
         return hierarchyIdx.reverseLookup( childId );
     }
 
 
-    public String getEntryUpdn( Long id ) throws IOException
+    public String getEntryUpdn( Long id ) throws Exception
     {
         return updnIdx.reverseLookup( id );
     }
 
 
-    public String getEntryUpdn( String dn ) throws IOException
+    public String getEntryUpdn( String dn ) throws Exception
     {
         Long id = ndnIdx.forwardLookup( dn );
         return updnIdx.reverseLookup( id );
     }
 
 
-    public int count() throws IOException
+    public int count() throws Exception
     {
         return master.count();
     }
@@ -843,9 +833,9 @@
      * @todo Optimize this by walking the hierarchy index instead of the name 
      * @param aliasId the id of the alias entry in the master table
      * @throws NamingException if we cannot parse ldap names
-     * @throws IOException if we cannot delete index values in the database
+     * @throws Exception if we cannot delete index values in the database
      */
-    private void dropAliasIndices( Long aliasId ) throws NamingException, IOException
+    private void dropAliasIndices( Long aliasId ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
         Long targetId = getEntryId( targetDn );
@@ -889,9 +879,9 @@
      * @param aliasId the id of alias entry to add
      * @throws NamingException if index addition fails, and if the alias is
      * not allowed due to chaining or cycle formation.
-     * @throws IOException if the underlying btrees cannot be altered
+     * @throws Exception if the underlying btrees cannot be altered
      */
-    private void addAliasIndices( Long aliasId, LdapDN aliasDn, String aliasTarget ) throws
IOException, NamingException
+    private void addAliasIndices( Long aliasId, LdapDN aliasDn, String aliasTarget ) throws
Exception
     {
         LdapDN normalizedAliasTargetDn; // Name value of aliasedObjectName
         Long targetId; // Id of the aliasedObjectName
@@ -1016,7 +1006,7 @@
     }
 
     
-    public void add( LdapDN normName, Attributes entry ) throws NamingException, IOException
+    public void add( LdapDN normName, Attributes entry ) throws Exception
     {
         Long id;
         Long parentId;
@@ -1111,13 +1101,13 @@
     }
 
 
-    public Attributes lookup( Long id ) throws IOException
+    public Attributes lookup( Long id ) throws Exception
     {
         return master.get( id );
     }
 
 
-    public void delete( Long id ) throws IOException, NamingException
+    public void delete( Long id ) throws Exception, NamingException
     {
         Attributes entry = lookup( id );
         Long parentId = getParentId( id );
@@ -1171,7 +1161,7 @@
     }
 
 
-    public Cursor<IndexRecord> list( Long id ) throws IOException
+    public Cursor<IndexRecord> list( Long id ) throws Exception
     {
         Cursor<IndexRecord> cursor = hierarchyIdx.cursor();
         IndexRecord record = new IndexRecord();
@@ -1181,7 +1171,7 @@
     }
 
 
-    public int getChildCount( Long id ) throws IOException
+    public int getChildCount( Long id ) throws Exception
     {
         return hierarchyIdx.count( id );
     }
@@ -1199,7 +1189,7 @@
     }
 
 
-    public Attributes getSuffixEntry() throws IOException
+    public Attributes getSuffixEntry() throws Exception
     {
         Long id = getEntryId( normSuffix.toNormName() );
 
@@ -1212,19 +1202,19 @@
     }
 
 
-    public void setProperty( String propertyName, String propertyValue ) throws IOException
+    public void setProperty( String propertyName, String propertyValue ) throws Exception
     {
         master.setProperty( propertyName, propertyValue );
     }
 
 
-    public String getProperty( String propertyName ) throws IOException
+    public String getProperty( String propertyName ) throws Exception
     {
         return master.getProperty( propertyName );
     }
 
 
-    public Attributes getIndices( Long id ) throws IOException, NamingException
+    public Attributes getIndices( Long id ) throws Exception
     {
         Attributes attributes = new AttributesImpl();
 
@@ -1314,10 +1304,9 @@
      * @param id the primary key of the entry
      * @param entry the entry to alter
      * @param mods the attribute and values to add 
-     * @throws NamingException if index alteration or attribute addition
-     * fails.
+     * @throws Exception if index alteration or attribute addition fails
      */
-    private void add( Long id, Attributes entry, Attribute mods ) throws IOException, NamingException
+    private void add( Long id, Attributes entry, Attribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getID() );
         
@@ -1367,10 +1356,9 @@
      * @param id the primary key of the entry
      * @param entry the entry to alter
      * @param mods the attribute and its values to delete
-     * @throws NamingException if index alteration or attribute modification 
-     * fails.
+     * @throws Exception if index alteration or attribute modification fails.
      */
-    private void remove( Long id, Attributes entry, Attribute mods ) throws NamingException,
IOException
+    private void remove( Long id, Attributes entry, Attribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getID() );
         
@@ -1437,7 +1425,7 @@
      * @throws NamingException if index alteration or attribute modification 
      * fails.
      */
-    private void replace( Long id, Attributes entry, Attribute mods ) throws NamingException,
IOException
+    private void replace( Long id, Attributes entry, Attribute mods ) throws Exception
     {
         String modsOid = oidRegistry.getOid( mods.getID() );
         
@@ -1484,7 +1472,7 @@
     }
 
 
-    public void modify( LdapDN dn, int modOp, Attributes mods ) throws NamingException, IOException
+    public void modify( LdapDN dn, int modOp, Attributes mods ) throws Exception
     {
         NamingEnumeration<String> attrs;
         Long id = getEntryId( dn.toString() );
@@ -1541,7 +1529,7 @@
     }
 
 
-    public void modify( LdapDN dn, List<ModificationItemImpl> mods ) throws NamingException,
IOException
+    public void modify( LdapDN dn, List<ModificationItemImpl> mods ) throws Exception
     {
         Long id = getEntryId( dn.toString() );
         Attributes entry = master.get( id );
@@ -1592,10 +1580,9 @@
      * @param dn the normalized distinguished name of the entry to alter
      * @param newRdn the new Rdn to set
      * @param deleteOldRdn whether or not to remove the old Rdn attr/val
-     * @throws NamingException if there are any errors propagating the name
-     *        changes.
+     * @throws Exception if there are any errors propagating the name changes
      */
-    public void rename( LdapDN dn, Rdn newRdn, boolean deleteOldRdn ) throws NamingException,
IOException
+    public void rename( LdapDN dn, Rdn newRdn, boolean deleteOldRdn ) throws Exception
     {
         String newRdnAttr = newRdn.getNormType();
         String newRdnValue = ( String ) newRdn.getValue();
@@ -1722,7 +1709,7 @@
      * which affects alias userIndices.
      * @throws NamingException if something goes wrong
      */
-    private void modifyDn( Long id, LdapDN updn, boolean isMove ) throws NamingException,
IOException
+    private void modifyDn( Long id, LdapDN updn, boolean isMove ) throws Exception
     {
         String aliasTarget;
 
@@ -1750,7 +1737,7 @@
          */
         if ( isMove )
         {
-            aliasTarget = ( String ) aliasIdx.reverseLookup( id );
+            aliasTarget = aliasIdx.reverseLookup( id );
 
             if ( null != aliasTarget )
             {
@@ -1783,8 +1770,7 @@
     }
 
 
-    public void move( LdapDN oldChildDn, LdapDN newParentDn, Rdn newRdn, boolean deleteOldRdn
)
-            throws NamingException, IOException
+    public void move( LdapDN oldChildDn, LdapDN newParentDn, Rdn newRdn, boolean deleteOldRdn
) throws Exception
     {
         Long childId = getEntryId( oldChildDn.toString() );
         rename( oldChildDn, newRdn, deleteOldRdn );
@@ -1797,7 +1783,7 @@
     }
 
 
-    public void move( LdapDN oldChildDn, LdapDN newParentDn ) throws NamingException, IOException
+    public void move( LdapDN oldChildDn, LdapDN newParentDn ) throws Exception
     {
         Long childId = getEntryId( oldChildDn.toString() );
         move( oldChildDn, childId, newParentDn );
@@ -1823,7 +1809,7 @@
      * @param newParentDn the normalized dn of the new parent for the child
      * @throws NamingException if something goes wrong
      */
-    private void move( LdapDN oldChildDn, Long childId, LdapDN newParentDn ) throws NamingException,
IOException
+    private void move( LdapDN oldChildDn, Long childId, LdapDN newParentDn ) throws Exception
     {
         // Get the child and the new parent to be entries and Ids
         Long newParentId = getEntryId( newParentDn.toString() );
@@ -1843,22 +1829,8 @@
          * Drop the old parent child relationship and add the new one
          * Set the new parent id for the child replacing the old parent id
          */
-        try
-        {
-            hierarchyIdx.drop( oldParentId, childId );
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
-        try
-        {
-            hierarchyIdx.add( newParentId, childId );
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
+        hierarchyIdx.drop( oldParentId, childId );
+        hierarchyIdx.add( newParentId, childId );
 
         /*
          * Build the new user provided DN (updn) for the child using the child's
@@ -1883,22 +1855,14 @@
      * @param movedBase the base at which the move occured - the moved node
      * @throws NamingException if system userIndices fail
      */
-    private void dropMovedAliasIndices( final LdapDN movedBase ) throws NamingException,
IOException
+    private void dropMovedAliasIndices( final LdapDN movedBase ) throws Exception
     {
         // Find all the aliases from movedBase down
         IndexAssertion isBaseDescendant = new IndexAssertion()
         {
-            public boolean assertCandidate( IndexRecord rec ) throws NamingException
+            public boolean assertCandidate( IndexRecord rec ) throws Exception
             {
-                String dn = null;
-                try
-                {
-                    dn = getEntryDn( (Long)rec.getEntryId() );
-                }
-                catch ( IOException e )
-                {
-                    e.printStackTrace();  //To change body of catch statement use File |
Settings | File Templates.
-                }
+                String dn = getEntryDn( rec.getEntryId() );
                 return dn.endsWith( movedBase.toString() );
             }
         };
@@ -1929,9 +1893,9 @@
      * 
      * @param aliasId the id of the alias 
      * @param movedBase the base where the move occured
-     * @throws NamingException if userIndices fail
+     * @throws Exception if userIndices fail
      */
-    private void dropAliasIndices( Long aliasId, LdapDN movedBase ) throws NamingException,
IOException
+    private void dropAliasIndices( Long aliasId, LdapDN movedBase ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
         Long targetId = getEntryId( targetDn );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursor.java?rev=613465&r1=613464&r2=613465&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursor.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursor.java
Sat Jan 19 13:49:26 2008
@@ -25,10 +25,7 @@
 
 import org.apache.directory.server.core.cursor.AbstractCursor;
 import org.apache.directory.server.core.cursor.InvalidCursorPositionException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
 import java.util.Comparator;
 
 
@@ -41,7 +38,6 @@
  */
 public class KeyCursor<E> extends AbstractCursor<E>
 {
-    private static final Logger LOG = LoggerFactory.getLogger( KeyCursor.class );
     private final Tuple tuple = new Tuple();
 
     private final BTree btree;
@@ -55,9 +51,9 @@
      *
      * @param btree the JDBM BTree to build a Cursor over
      * @param comparator the Comparator used to determine key ordering
-     * @throws IOException of there are problems accessing the BTree
+     * @throws Exception of there are problems accessing the BTree
      */
-    public KeyCursor( BTree btree, Comparator<E> comparator ) throws IOException
+    public KeyCursor( BTree btree, Comparator<E> comparator ) throws Exception
     {
         this.btree = btree;
         this.comparator = comparator;
@@ -78,14 +74,14 @@
     }
 
 
-    public void before( E element ) throws IOException
+    public void before( E element ) throws Exception
     {
         browser = btree.browse( element );
         clearValue();
     }
 
 
-    public void after( E element ) throws IOException
+    public void after( E element ) throws Exception
     {
         browser = btree.browse( element );
 
@@ -125,34 +121,34 @@
     }
 
 
-    public void beforeFirst() throws IOException
+    public void beforeFirst() throws Exception
     {
         browser = btree.browse();
         clearValue();
     }
 
 
-    public void afterLast() throws IOException
+    public void afterLast() throws Exception
     {
         browser = btree.browse( null );
     }
 
 
-    public boolean first() throws IOException
+    public boolean first() throws Exception
     {
         beforeFirst();
         return next();
     }
 
 
-    public boolean last() throws IOException
+    public boolean last() throws Exception
     {
         afterLast();
         return previous();
     }
 
 
-    public boolean previous() throws IOException
+    public boolean previous() throws Exception
     {
         if ( browser == null )
         {
@@ -171,7 +167,7 @@
     }
 
 
-    public boolean next() throws IOException
+    public boolean next() throws Exception
     {
         if ( browser == null )
         {
@@ -190,7 +186,7 @@
     }
 
 
-    public E get() throws IOException
+    public E get() throws Exception
     {
         if ( valueAvailable )
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/SameKeyTupleCursor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/SameKeyTupleCursor.java?rev=613465&r1=613464&r2=613465&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/SameKeyTupleCursor.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/SameKeyTupleCursor.java
Sat Jan 19 13:49:26 2008
@@ -23,7 +23,6 @@
 import org.apache.directory.server.core.cursor.InvalidCursorPositionException;
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
 
-import java.io.IOException;
 import java.util.Comparator;
 
 import jdbm.helper.TupleBrowser;
@@ -56,9 +55,9 @@
      * @param btree the JDBM BTree to build a Cursor over
      * @param key the constant key for which values are returned
      * @param comparator the Comparator used to determine <b>key</b> ordering
-     * @throws IOException of there are problems accessing the BTree
+     * @throws Exception of there are problems accessing the BTree
      */
-    public SameKeyTupleCursor( BTree btree, Object key, Comparator comparator ) throws IOException
+    public SameKeyTupleCursor( BTree btree, Object key, Comparator comparator ) throws Exception
     {
         this.key = key;
         this.btree = btree;
@@ -86,16 +85,16 @@
      * all.
      *
      * @param element the valueTuple who's value is used to position this Cursor
-     * @throws IOException if there are failures to position the Cursor
+     * @throws Exception if there are failures to position the Cursor
      */
-    public void before( Tuple element ) throws IOException
+    public void before( Tuple element ) throws Exception
     {
         browser = btree.browse( element.getValue() );
         clearValue();
     }
 
 
-    public void after( Tuple element ) throws IOException
+    public void after( Tuple element ) throws Exception
     {
         browser = btree.browse( element.getValue() );
 
@@ -143,34 +142,34 @@
     }
 
 
-    public void beforeFirst() throws IOException
+    public void beforeFirst() throws Exception
     {
         browser = btree.browse();
         clearValue();
     }
 
 
-    public void afterLast() throws IOException
+    public void afterLast() throws Exception
     {
         browser = btree.browse( null );
     }
 
 
-    public boolean first() throws IOException
+    public boolean first() throws Exception
     {
         beforeFirst();
         return next();
     }
 
 
-    public boolean last() throws IOException
+    public boolean last() throws Exception
     {
         afterLast();
         return previous();
     }
 
 
-    public boolean previous() throws IOException
+    public boolean previous() throws Exception
     {
         if ( browser.getPrevious( valueTuple ) )
         {
@@ -186,7 +185,7 @@
     }
 
 
-    public boolean next() throws IOException
+    public boolean next() throws Exception
     {
         if ( browser.getNext( valueTuple ) )
         {
@@ -202,7 +201,7 @@
     }
 
 
-    public Tuple get() throws IOException
+    public Tuple get() throws Exception
     {
         if ( valueAvailable )
         {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.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/KeyCursorTest.java?rev=613465&r1=613464&r2=613465&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
Sat Jan 19 13:49:26 2008
@@ -38,7 +38,6 @@
 import jdbm.recman.BaseRecordManager;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.Comparator;
 
 
@@ -105,7 +104,7 @@
 
 
     @Test
-    public void testPreviousBeforePositioning() throws IOException
+    public void testPreviousBeforePositioning() throws Exception
     {
         // test initial setup, advances after, and before inside elements
         assertInvalidCursor();
@@ -116,7 +115,7 @@
 
 
     @Test
-    public void testNextBeforePositioning() throws IOException
+    public void testNextBeforePositioning() throws Exception
     {
         // test initial setup, advances after, and before inside elements
         assertInvalidCursor();
@@ -127,7 +126,7 @@
 
 
     @Test
-    public void testOperations() throws IOException
+    public void testOperations() throws Exception
     {
         // test initial setup, advances after, and before inside elements
         assertInvalidCursor();
@@ -268,7 +267,7 @@
 
     
     @Test
-    public void testMiscelleneous() throws IOException
+    public void testMiscelleneous() throws Exception
     {
         // Test available()
         
@@ -295,7 +294,7 @@
             cursor.get();
             fail( "Invalid Cursor should not return valid value from get()" );
         }
-        catch ( IOException e )
+        catch ( Exception e )
         {
             assertNotNull( e );
         }



Mime
View raw message