RFR: jsr166 jdk10 integration wave 5
David Holmes
david.holmes at oracle.com
Mon Nov 6 21:36:04 UTC 2017
Hi Martin,
On 7/11/2017 6:00 AM, Martin Buchholz wrote:
> The notable thing this time around is the embarrassing number of rare
> races being fixed, all of which are second tries. This time for sure!
>
> There's a large number of boring changes to appease errorprone, notably
> http://errorprone.info/bugpattern/RandomModInteger
> http://errorprone.info/bugpattern/MixedArrayDimensions
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk10/jsr166-integration/overview.html
>
> 8190747: ExecutorService/Invoke.java fails intermittently
Looks fine.
> 8179314: CountedCompleterTest.testForkHelpQuiesce fails with
> expected:<21> but was:<13>
Looks fine.
> 8189387: ConcurrentLinkedDeque linearizability continued ...
Can't really comment on linearizability changes but I found this change
to be very confusing:
src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
final Node<E> pred(Node<E> p) {
! Node<E> q = p.prev;
! return (p == q) ? last() : q;
}
/**
* Returns the first node, the unique node p for which:
* p.prev == null && p.next != p
--- 693,705 ----
* Returns the predecessor of p, or the last node if p.prev has been
* linked to self, which will only be true if traversing with a
* stale pointer that is now off the list.
*/
final Node<E> pred(Node<E> p) {
! if (p == (p = p.prev))
! p = last();
! return p;
}
The original version is quite clear, the new version is trying to be far
too clever with order of evaluation and to me is far less clear.
> 8189764: Miscellaneous changes imported from jsr166 CVS 2017-11
All seem okay. Though I'm curious about the changes from
"catch(Throwable" to "catch(Exception" ?
Thanks,
David
More information about the core-libs-dev
mailing list