Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E89B7D663 for ; Wed, 22 Aug 2012 22:23:40 +0000 (UTC) Received: (qmail 30499 invoked by uid 500); 22 Aug 2012 22:23:40 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 30461 invoked by uid 500); 22 Aug 2012 22:23:40 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 30454 invoked by uid 99); 22 Aug 2012 22:23:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 22:23:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 22:23:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E6C4B23888E3 for ; Wed, 22 Aug 2012 22:22:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1376289 - /directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Date: Wed, 22 Aug 2012 22:22:53 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120822222253.E6C4B23888E3@eris.apache.org> Author: elecharny Date: Wed Aug 22 22:22:53 2012 New Revision: 1376289 URL: http://svn.apache.org/viewvc?rev=1376289&view=rev Log: Removed useless casts Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=1376289&r1=1376288&r2=1376289&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original) +++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Wed Aug 22 22:22:53 2012 @@ -308,11 +308,11 @@ public class JdbmTable extends Abs if ( !allowsDuplicates ) { - return ( V ) bt.find( key ); + return bt.find( key ); } DupsContainer values = getDupsContainer( ( byte[] ) bt.find( key ) ); - + if ( values.isArrayTree() ) { ArrayTree set = values.getArrayTree(); @@ -439,7 +439,7 @@ public class JdbmTable extends Abs Tuple tuple = bt.findGreaterOrEqual( key ); // Test for equality first since it satisfies equal to condition - if ( null != tuple && keyComparator.compare( ( K ) tuple.getKey(), key ) == 0 ) + if ( null != tuple && keyComparator.compare( tuple.getKey(), key ) == 0 ) { return true; } @@ -492,7 +492,7 @@ public class JdbmTable extends Abs if ( !allowsDuplicates ) { - V stored = ( V ) bt.find( key ); + V stored = bt.find( key ); return null != stored && stored.equals( value ); } @@ -638,7 +638,7 @@ public class JdbmTable extends Abs if ( !allowsDuplicates ) { - V oldValue = ( V ) bt.find( key ); + V oldValue = bt.find( key ); // Remove the value only if it is the same as value. if ( ( oldValue != null ) && oldValue.equals( value ) ) @@ -833,7 +833,7 @@ public class JdbmTable extends Abs if ( !allowsDuplicates ) { return new SingletonCursor>( - new org.apache.directory.shared.ldap.model.cursor.Tuple( key, ( V ) raw ) ); + new org.apache.directory.shared.ldap.model.cursor.Tuple( key, raw ) ); } byte[] serialized = ( byte[] ) raw; @@ -867,7 +867,7 @@ public class JdbmTable extends Abs if ( !allowsDuplicates ) { - return new SingletonCursor( ( V ) raw ); + return new SingletonCursor( raw ); } byte[] serialized = ( byte[] ) raw; @@ -1070,7 +1070,7 @@ public class JdbmTable extends Abs { bTree.insert( keys.get(), ( K ) StringConstants.EMPTY_BYTES, true ); } - + keys.close(); return bTree;