Resync j.u.c and Update ConcurrentHashMap to v8 - JEP 155

Mike Duigou mike.duigou at
Sat May 25 03:17:46 UTC 2013

Hi Chris;

There's an awful lot here!

- I found it hard to read the javadoc changes with all of the <tt> -> {@code} changes. I made webrev with only the non-<tt> changes:

- Martin had  pushed the changes for "7178639: Deque.push specifies that it returns a value but the method is void" to Doug's repo. Can we include it?

- It was surprising (and somewhat disappointing) to see changes like the following in various places. Is iterator creation that expensive? I'd hate to have to go back to using old style for loops everywhere.

-        List<Future<T>> futures = new ArrayList<Future<T>>(tasks.size());
+        ArrayList<Future<T>> futures = new ArrayList<Future<T>>(tasks.size());

Why not 'List<Future<T>> futures = new ArrayList<>(tasks.size());' ?


-                for (Future<T> f : futures)
-                    f.cancel(true);
+                for (int i = 0, size = futures.size(); i < size; i++)
+                    futures.get(i).cancel(true);

Use forEach(f -> { f.cancel(true);}) ?

- Empty diffs in CompletableFuture and elsewhere are whitespace only changes?

- The default for getOrDefault() in ConcurrentMap shouldn't be removed.

- CopyOnWriteArraySet currently has an ORDERED spliterator. Set is not normally order preserving.

- I find TimeUnit.NANOSECONDS to be less ambiguous than static import of NANOSECONDS. Personal taste I guess.

- I have reviewed only up to AtomicBoolean in the webrev and not reviewed the specdiff yet. (But I or someone should). I will continue on Tuesday.


On May 24 2013, at 09:12 , Chris Hegarty wrote:

> The final outstanding task from JEP 155 is to add CHMv8, and update the remainder of the j.u.c implementation, add spliterator implementation for concurrent collections, etc
> 8004138: Resync java.util.concurrent classes with Dougs CVS - 05/2013
> 8005704: Update ConcurrentHashMap to v8
> specdiff:
> webrev
> As per usual all changes are coming from Doug, and others. Most of the changes have been baking in the lambda repo for some time now.
> I'm not expecting an in dept review per say. All regression tests and JCK will be run. I guess the main focus should be on the new CHM API's
> -Chris.

More information about the core-libs-dev mailing list