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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentMap.java (file contents):
Revision 1.49 by jsr166, Sat Dec 7 17:10:57 2013 UTC vs.
Revision 1.50 by jsr166, Sat Dec 7 17:26:50 2013 UTC

# Line 231 | Line 231 | public interface ConcurrentMap<K,V> exte
231       * @implSpec
232       * <p>The default implementation is equivalent to, for this {@code map}:
233       * <pre> {@code
234 <     * for (Map.Entry<K,V> entry : map.entrySet())
235 <     *     do {
236 <     *        K k = entry.getKey();
237 <     *        V v = entry.getValue();
238 <     *     } while (!replace(k, v, function.apply(k, v)));
234 >     * for (Map.Entry<K,V> entry : map.entrySet()) {
235 >     *   K k;
236 >     *   V v;
237 >     *   do {
238 >     *     k = entry.getKey();
239 >     *     v = entry.getValue();
240 >     *   } while (!map.replace(k, v, function.apply(k, v)));
241       * }</pre>
242       *
243       * The default implementation may retry these steps when multiple

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines