directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r481604 - in /directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm: BTreeTupleEnumeration.java DupsEnumeration.java JdbmPartition.java JdbmTable.java
Date Sat, 02 Dec 2006 19:16:42 GMT
Author: akarasulu
Date: Sat Dec  2 11:16:40 2006
New Revision: 481604

URL: http://svn.apache.org/viewvc?view=rev&rev=481604
Log:
added generics to avoid eclipse warnings

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumeration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsEnumeration.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumeration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumeration.java?view=diff&rev=481604&r1=481603&r2=481604
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumeration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumeration.java
Sat Dec  2 11:16:40 2006
@@ -61,7 +61,8 @@
     private boolean success = false;
     
     
-    BTreeTupleEnumeration( BTree tree, Comparator comparator, Object key, Object val, boolean
isGreaterThan ) throws LdapNamingException 
+    BTreeTupleEnumeration( BTree tree, Comparator<Object> comparator, Object key, Object
val, boolean isGreaterThan ) 
+        throws LdapNamingException 
     {
         this.key = key;
         stepForward = isGreaterThan;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsEnumeration.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsEnumeration.java?view=diff&rev=481604&r1=481603&r2=481604
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsEnumeration.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsEnumeration.java
Sat Dec  2 11:16:40 2006
@@ -23,6 +23,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.TreeSet;
 
@@ -186,6 +187,7 @@
      * The values pulled off of this iterator are put into prefetched. 
      * </p>
      */
+    @SuppressWarnings("unchecked")
     private void prefetch() throws NamingException
     {
         /*
@@ -222,7 +224,7 @@
                          * over the array list.  I don't think there is a way to 
                          * do this on the TreeSet.
                          */
-                        ArrayList list = new ArrayList( set.size() );
+                        List list = new ArrayList( set.size() );
                         list.addAll( set );
                         Collections.reverse( list );
                         dupIterator = list.iterator();

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=481604&r1=481603&r2=481604
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Sat Dec  2 11:16:40 2006
@@ -92,9 +92,9 @@
     /** the master table storing entries by primary key */
     private JdbmMasterTable master;
     /** a map of attribute names to user indices */
-    private Map indices;
+    private Map<String, Index> indices;
     /** a map of index names to system indices */
-    private Map sysIndices;
+    private Map<String, Index> sysIndices;
 
     /** true if open */
     private boolean initialized;
@@ -183,8 +183,8 @@
         }
 
         master = new JdbmMasterTable( recMan );
-        indices = new HashMap();
-        sysIndices = new HashMap();
+        indices = new HashMap<String,Index>();
+        sysIndices = new HashMap<String,Index>();
 
         super.init( factoryCfg, cfg );
         initialized = true;
@@ -198,7 +198,7 @@
             return;
         }
 
-        ArrayList array = new ArrayList();
+        List<Index> array = new ArrayList<Index>();
         array.addAll( indices.values() );
 
         if ( null != ndnIdx )
@@ -287,7 +287,7 @@
             return;
         }
 
-        ArrayList array = new ArrayList();
+        List<Index> array = new ArrayList<Index>();
         array.addAll( indices.values() );
         array.add( ndnIdx );
         array.add( updnIdx );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?view=diff&rev=481604&r1=481603&r2=481604
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
Sat Dec  2 11:16:40 2006
@@ -83,7 +83,7 @@
 
     private int numDupLimit = IndexConfiguration.DEFAULT_DUPLICATE_LIMIT;
 
-    private Map duplicateBtrees = new HashMap();
+    private Map<Long, BTree> duplicateBtrees = new HashMap<Long, BTree>();
     
     
     // ------------------------------------------------------------------------
@@ -356,6 +356,7 @@
      * @see Table#has(java.lang.Object,
      * java.lang.Object, boolean)
      */
+    @SuppressWarnings("unchecked")
     public boolean has( Object key, Object val, boolean isGreaterThan ) throws NamingException
     {
         if ( !allowsDuplicates )
@@ -582,6 +583,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Table#put(java.lang.Object,
      * java.lang.Object)
      */
+    @SuppressWarnings("unchecked")
     public Object put( Object key, Object value ) throws NamingException
     {
         Object replaced = null;
@@ -654,6 +656,7 @@
      * @see Table#put(java.lang.Object,
      * javax.naming.NamingEnumeration)
      */
+    @SuppressWarnings("unchecked")
     public Object put( Object key, NamingEnumeration values ) throws NamingException
     {
         /*
@@ -1063,6 +1066,7 @@
     /**
      * @see org.apache.directory.server.core.partition.impl.btree.Table#listTuples(java.lang.Object)
      */
+    @SuppressWarnings("unchecked")
     public NamingEnumeration listTuples( Object key ) throws NamingException
     {
         // Handle single and zero value returns without duplicates enabled
@@ -1171,6 +1175,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Table#listTuples(java.lang.Object,
      * java.lang.Object, boolean)
      */
+    @SuppressWarnings("unchecked")
     public NamingEnumeration listTuples( Object key, Object val, boolean isGreaterThan )
throws NamingException
     {
         if ( !allowsDuplicates )



Mime
View raw message