directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1378599 - /directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Date Wed, 29 Aug 2012 15:03:16 GMT
Author: elecharny
Date: Wed Aug 29 15:03:15 2012
New Revision: 1378599

URL: http://svn.apache.org/viewvc?rev=1378599&view=rev
Log:
Removed the generic parameter from the ParentIdAndRdn, it's mplicitly an UUID

Modified:
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1378599&r1=1378598&r2=1378599&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Wed Aug 29 15:03:15 2012
@@ -58,7 +58,7 @@ import org.junit.Test;
 public class JdbmRdnIndexTest
 {
     private static File dbFileDir;
-    Index<ParentIdAndRdn<UUID>, Entry, UUID> idx;
+    Index<ParentIdAndRdn, Entry, UUID> idx;
     private static SchemaManager schemaManager;
 
 
@@ -245,13 +245,13 @@ public class JdbmRdnIndexTest
         initIndex();
         assertEquals( 0, idx.count() );
 
-        ParentIdAndRdn<UUID> key = new ParentIdAndRdn<UUID>( Strings.getUUID(
0L ), new Rdn( "cn=key" ) );
+        ParentIdAndRdn key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( "cn=key"
) );
 
         idx.add( key, Strings.getUUID( 0L ) );
         assertEquals( 1, idx.count() );
 
         // setting a different parentId should make this key a different key
-        key = new ParentIdAndRdn<UUID>( Strings.getUUID( 1L ), new Rdn( "cn=key" )
);
+        key = new ParentIdAndRdn( Strings.getUUID( 1L ), new Rdn( "cn=key" ) );
 
         idx.add( key, Strings.getUUID( 1L ) );
         assertEquals( 2, idx.count() );
@@ -260,7 +260,7 @@ public class JdbmRdnIndexTest
         idx.add( key, Strings.getUUID( 2L ) );
         assertEquals( 2, idx.count() );
 
-        key = new ParentIdAndRdn<UUID>( Strings.getUUID( 2L ), new Rdn( "cn=key" )
);
+        key = new ParentIdAndRdn( Strings.getUUID( 2L ), new Rdn( "cn=key" ) );
         idx.add( key, Strings.getUUID( 3L ) );
         assertEquals( 3, idx.count() );
     }
@@ -271,7 +271,7 @@ public class JdbmRdnIndexTest
     {
         initIndex();
 
-        ParentIdAndRdn<UUID> key = new ParentIdAndRdn<UUID>( Strings.getUUID(
0L ), new Rdn( "cn=key" ) );
+        ParentIdAndRdn key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( "cn=key"
) );
 
         assertEquals( 0, idx.count( key ) );
 
@@ -289,7 +289,7 @@ public class JdbmRdnIndexTest
     {
         initIndex();
 
-        ParentIdAndRdn<UUID> key = new ParentIdAndRdn<UUID>( Strings.getUUID(
0L ), new Rdn( schemaManager, "cn=key" ) );
+        ParentIdAndRdn key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( schemaManager,
"cn=key" ) );
 
         assertNull( idx.forwardLookup( key ) );
 
@@ -299,7 +299,7 @@ public class JdbmRdnIndexTest
 
         // check with the different case in UP name, this ensures that the custom
         // key comparator is used
-        key = new ParentIdAndRdn<UUID>( Strings.getUUID( 0L ), new Rdn( schemaManager,
"cn=KEY" ) );
+        key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( schemaManager, "cn=KEY"
) );
         assertEquals( Strings.getUUID( 0L ), idx.forwardLookup( key ) );
         assertEquals( key, idx.reverseLookup( Strings.getUUID( 0L ) ) );
     }
@@ -310,7 +310,7 @@ public class JdbmRdnIndexTest
     {
         initIndex();
 
-        ParentIdAndRdn<UUID> key = new ParentIdAndRdn<UUID>( Strings.getUUID(
0L ), new Rdn( "cn=key" ) );
+        ParentIdAndRdn key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( "cn=key"
) );
 
         assertNull( idx.forwardLookup( key ) );
 
@@ -333,7 +333,7 @@ public class JdbmRdnIndexTest
     {
         initIndex();
 
-        ParentIdAndRdn<UUID> key = new ParentIdAndRdn<UUID>( Strings.getUUID(
0L ), new Rdn( "cn=key" ) );
+        ParentIdAndRdn key = new ParentIdAndRdn( Strings.getUUID( 0L ), new Rdn( "cn=key"
) );
 
         assertEquals( 0, idx.count() );
 
@@ -342,7 +342,7 @@ public class JdbmRdnIndexTest
 
         for ( long i = 1; i < 5; i++ )
         {
-            key = new ParentIdAndRdn<UUID>( Strings.getUUID( i ), new Rdn( "cn=key"
+ i ) );
+            key = new ParentIdAndRdn( Strings.getUUID( i ), new Rdn( "cn=key" + i ) );
 
             idx.add( key, Strings.getUUID( i ) );
         }
@@ -350,23 +350,23 @@ public class JdbmRdnIndexTest
         assertEquals( 5, idx.count() );
 
         // use forward index's cursor
-        Cursor<IndexEntry<ParentIdAndRdn<UUID>, UUID>> cursor = idx.forwardCursor();
+        Cursor<IndexEntry<ParentIdAndRdn, UUID>> cursor = idx.forwardCursor();
         cursor.beforeFirst();
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<UUID>, UUID> e1 = cursor.get();
+        IndexEntry<ParentIdAndRdn, UUID> e1 = cursor.get();
         assertEquals( Strings.getUUID( 0L ), e1.getId() );
         assertEquals( "cn=key", e1.getKey().getRdns()[0].getName() );
         assertEquals( Strings.getUUID( 0L ), e1.getKey().getParentId() );
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<UUID>, UUID> e2 = cursor.get();
+        IndexEntry<ParentIdAndRdn, UUID> e2 = cursor.get();
         assertEquals( Strings.getUUID( 1L ), e2.getId() );
         assertEquals( "cn=key1", e2.getKey().getRdns()[0].getName() );
         assertEquals( Strings.getUUID( 1L ), e2.getKey().getParentId() );
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<UUID>, UUID> e3 = cursor.get();
+        IndexEntry<ParentIdAndRdn, UUID> e3 = cursor.get();
         assertEquals( Strings.getUUID( 2L ), e3.getId() );
         assertEquals( "cn=key2", e3.getKey().getRdns()[0].getName() );
         assertEquals( Strings.getUUID( 2 ), e3.getKey().getParentId() );



Mime
View raw message