directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r760933 - /directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java
Date Wed, 01 Apr 2009 15:47:52 GMT
Author: akarasulu
Date: Wed Apr  1 15:47:51 2009
New Revision: 760933

URL: http://svn.apache.org/viewvc?rev=760933&view=rev
Log:
cleaning up some generic warnings and adding note about failures of insert()

Modified:
    directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java

Modified: directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java?rev=760933&r1=760932&r2=760933&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java
(original)
+++ directory/apacheds/branches/ldif-partition/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeMap.java
Wed Apr  1 15:47:51 2009
@@ -96,6 +96,8 @@
      *
      * @param key the item to be inserted
      * @return the replaced key if it already exists
+     * TODO - should we not return the value if the key already existed?
+     * TODO - insert has no effect if the key already exists and dups are not allowed.
      * Note: Ignores if a node with the given key already exists.
      */
     public K insert( K key, V value )
@@ -167,6 +169,7 @@
     }
     
     
+    @SuppressWarnings("unchecked")
     private K insertDupKey( K key, V value, LinkedAvlMapNode existingNode )
     {
         AvlTree<V> dupsTree = null;
@@ -269,6 +272,7 @@
      *              including any values having the same key
      * @return the removed key, if any, or null if the key does not exist
      */
+    @SuppressWarnings("unchecked")
     public K remove( K key, V value )
     {
         LinkedAvlMapNode<K,V> temp = null;
@@ -905,6 +909,7 @@
     }
     
 
+    @SuppressWarnings("unchecked")
     public LinkedAvlMapNode<K,V> find( K key, V value )
     {
         if( key == null || value == null )



Mime
View raw message