2732 |
|
* using tree comparisons from root, but continues linear |
2733 |
|
* search when lock not available. |
2734 |
|
*/ |
2735 |
< |
final Node<K,V> find(int h, Object k) { |
2735 |
> |
final Node<K,V> find(int h, Object k) { |
2736 |
|
if (k != null) { |
2737 |
< |
for (Node<K,V> e = first; e != null; e = e.next) { |
2737 |
> |
for (Node<K,V> e = first; e != null; ) { |
2738 |
|
int s; K ek; |
2739 |
|
if (((s = lockState) & (WAITER|WRITER)) != 0) { |
2740 |
|
if (e.hash == h && |
2741 |
|
((ek = e.key) == k || (ek != null && k.equals(ek)))) |
2742 |
|
return e; |
2743 |
+ |
e = e.next; |
2744 |
|
} |
2745 |
|
else if (U.compareAndSwapInt(this, LOCKSTATE, s, |
2746 |
|
s + READER)) { |