8028564: Concurrent calls to CHM.put can fail to add the key/value to the map

Martin Buchholz martinrb at google.com
Fri Dec 6 17:00:46 UTC 2013


Doug and I would prefer that there were ZERO differences between jsr166 CVS
and openjdk, but that seems unachievable.  At least try to treat jsr166 CVS
as canonical upstream sources and minimize any divergence.


On Fri, Dec 6, 2013 at 12:38 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:

> On Dec 5, 2013, at 9:29 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> > On 12/05/2013 03:18 PM, Brent Christian wrote:
> >> I'm curious about why this was done:
> >>
> >> *** 4452,4462 ****
> >>           public final boolean removeAll(Collection<?> c) {
> >> !             Objects.requireNonNull(c);
> >>               boolean modified = false;
> >> --- 4495,4505 ----
> >>           public final boolean removeAll(Collection<?> c) {
> >> !             if (c == null) throw new NullPointerException();
> >>               boolean modified = false;
> >
> > It wasn't actually done. In part as a way to keep base jsr166
> > sources for CHM and most other existing classes as JDK7-compatible
> > as possible, the jsr166 versions always use the explicit form.
> > For this update, the Oracle-initiated changes that hadn't been in
> > jsr166 versions don't appear.
> >
>
> My preference is to keep CHM (and other classes) in 8 as close as possible
> to CHM in 166, otherwise it just makes it harder to apply fixes. So i
> deliberately took the 166 version of the null checks.
>
> I tend to take sources from 166, copy them into the JDK overwriting the
> existing sources, and then carefully go through the diffs (via the IDE)
> selectively applying. We already have one annoying diff related to
> @Deprecated which is in 166 but not in CHM and that is extremely easy to
> overlook.
>
> Paul.
>



More information about the core-libs-dev mailing list