You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/07/22 14:35:56 UTC

svn commit: r1149589 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/schema/ jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ ldif-partition/src/main/java/org/apache/direct...

Author: elecharny
Date: Fri Jul 22 12:35:54 2011
New Revision: 1149589

URL: http://svn.apache.org/viewvc?rev=1149589&view=rev
Log:
o Cleaned the Partition.doDestroy() methods
o Removed commented code
o Removed useless printStackTrace

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=1149589&r1=1149588&r2=1149589&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Fri Jul 22 12:35:54 2011
@@ -237,6 +237,8 @@ public final class SchemaPartition exten
             LOG.error( I18n.err( I18n.ERR_91 ), e );
             throw new RuntimeException( e );
         }
+        
+        initialized = false;
     }
 
 

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=1149589&r1=1149588&r2=1149589&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Fri Jul 22 12:35:54 2011
@@ -407,7 +407,6 @@ public class JdbmPartition extends Abstr
         }
         catch ( Throwable t )
         {
-            t.printStackTrace();
             LOG.error( I18n.err( I18n.ERR_127 ), t );
             errors.addThrowable( t );
         }

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java?rev=1149589&r1=1149588&r2=1149589&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java Fri Jul 22 12:35:54 2011
@@ -52,265 +52,6 @@ public abstract class AbstractLdifPartit
     }
 
 
-    @Override
-    protected void doDestroy() throws Exception
-    {
-        // Nothing to do : we don't have index
-    }
-
-    
-    /**
-     * @return the wrappedPartition
-     *
-    public Partition getWrappedPartition()
-    {
-        return wrappedPartition;
-    }
-
-
-    /**
-     * @param wrappedPartition the wrappedPartition to set
-     *
-    public void setWrappedPartition( AvlPartition wrappedPartition )
-    {
-        this.wrappedPartition = wrappedPartition;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public void addIndexOn( Index<?, Entry, Long> index ) throws Exception
-    {
-        wrappedPartition.addIndexOn( index );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public int count() throws Exception
-    {
-        return wrappedPartition.count();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    protected void doDestroy() throws Exception
-    {
-        wrappedPartition.destroy();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<String, Entry, Long> getAliasIndex()
-    {
-        return wrappedPartition.getAliasIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public int getChildCount( Long id ) throws LdapException
-    {
-        return wrappedPartition.getChildCount( id );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Dn getEntryDn( Long id ) throws Exception
-    {
-        return wrappedPartition.getEntryDn( id );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public Long getEntryId( Dn dn ) throws LdapException
-    {
-        return wrappedPartition.getEntryId( dn );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<Long, Entry, Long> getOneAliasIndex()
-    {
-        return wrappedPartition.getOneAliasIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<Long, Entry, Long> getOneLevelIndex()
-    {
-        return wrappedPartition.getOneLevelIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<String, Entry, Long> getPresenceIndex()
-    {
-        return wrappedPartition.getPresenceIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<Long, Entry, Long> getSubAliasIndex()
-    {
-        return wrappedPartition.getSubAliasIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<Long, Entry, Long> getSubLevelIndex()
-    {
-        return wrappedPartition.getSubLevelIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<?, Entry, Long> getSystemIndex( AttributeType attributeType ) throws IndexNotFoundException
-    {
-        return wrappedPartition.getSystemIndex( attributeType );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Iterator<String> getSystemIndices()
-    {
-        return wrappedPartition.getSystemIndices();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Index<?, Entry, Long> getUserIndex( AttributeType attributeType ) throws IndexNotFoundException
-    {
-        return wrappedPartition.getUserIndex( attributeType );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public Iterator<String> getUserIndices()
-    {
-        return wrappedPartition.getUserIndices();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public boolean hasSystemIndexOn( AttributeType attributeType ) throws LdapException
-    {
-        return wrappedPartition.hasSystemIndexOn( attributeType );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public boolean hasUserIndexOn( AttributeType attributeType ) throws LdapException
-    {
-        return wrappedPartition.hasUserIndexOn( attributeType );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public boolean isInitialized()
-    {
-        return wrappedPartition != null && wrappedPartition.isInitialized();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public IndexCursor<Long, Entry, Long> list( Long id ) throws LdapException
-    {
-        return wrappedPartition.list( id );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public void setSchemaManager( SchemaManager schemaManager )
-    {
-        super.setSchemaManager( schemaManager );
-        wrappedPartition.setSchemaManager( schemaManager );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public void sync() throws Exception
-    {
-        wrappedPartition.sync();
-    }
-
-
-    public void unbind( UnbindOperationContext unbindContext ) throws LdapException
-    {
-        wrappedPartition.unbind( unbindContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public void setId( String id )
-    {
-        super.setId( id );
-        wrappedPartition.setId( id );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    @Override
-    public void setSuffixDn( Dn suffix ) throws LdapInvalidDnException
-    {
-        super.setSuffixDn( suffix );
-        wrappedPartition.setSuffixDn( suffix );
-    }
-
-
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1149589&r1=1149588&r2=1149589&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java Fri Jul 22 12:35:54 2011
@@ -459,6 +459,7 @@ public class SingleFileLdifPartition ext
     @Override
     protected void doDestroy() throws Exception
     {
+        super.doDestroy();
         ldifFile.close();
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java?rev=1149589&r1=1149588&r2=1149589&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java Fri Jul 22 12:35:54 2011
@@ -95,13 +95,6 @@ public class AvlPartition extends Abstra
     }
 
 
-    @Override
-    protected void doDestroy() throws Exception
-    {
-        // Nothing to do, we currently have no index (yet)
-    }
-
-
     /**
      * {@inheritDoc}
      */