ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.202 by jsr166, Thu Apr 11 17:50:12 2013 UTC vs.
Revision 1.203 by dl, Thu Apr 11 18:15:53 2013 UTC

# Line 774 | Line 774 | public class ConcurrentHashMap<K,V>
774          }
775  
776          /**
777         * Finds or adds a node. A front-end for recursive version
778         * @return null if added
779         */
780        final TreeNode<V> putTreeNode(int h, Object k, V v) {
781            return putTreeNode(h, k, v, comparableClassFor(k));
782        }
783
784        /**
777           * Returns the TreeNode (or null if not found) for the given key
778           * starting at given root.
779           */
# Line 835 | Line 827 | public class ConcurrentHashMap<K,V>
827              return r == null ? null : r.val;
828          }
829  
838
830          /**
831 <         * recursive add.
831 >         * Finds or adds a node.
832           * @return null if added
833           */
834          @SuppressWarnings("unchecked") final TreeNode<V> putTreeNode
835 <            (int h, Object k, V v, Class<?> cc) {
835 >            (int h, Object k, V v) {
836 >            Class<?> cc = comparableClassFor(k);
837              TreeNode<V> pp = root, p = null;
838              int dir = 0;
839              while (pp != null) { // find existing node or leaf to insert at

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines