Re: RFR: JDK-8200436 - String::isBlank

2018-05-14 Thread Sundararajan Athijegannathan
+1 -Sundar On 14/05/18, 8:55 PM, Jim Laskey wrote: New string instance method that returns true if the string is empty or contains only white space, where white space is defined as any codepoint returns true when passed to Character::isWhitespace. webrev:

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Ivan Gerasimov
On 5/14/18 5:22 PM, Claes Redestad wrote: I was actually toying with and testing a change to this effect anyway, since it's a nice cleanup and might help the JIT somewhat: http://cr.openjdk.java.net/~redestad/8196340/open.02/ A note on correctness: none of the code in ArrayList that

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Paul Sandoz
> On May 14, 2018, at 5:51 PM, David Holmes wrote: > > On 15/05/2018 7:56 AM, Paul Sandoz wrote: >>> On May 14, 2018, at 2:04 PM, Martin Buchholz wrote: >>> On Mon, May 14, 2018 at 1:45 PM, Paul Sandoz >>

[core-libs] RFR (L): 8010319: Implementation of JEP 181: Nest-Based Access Control

2018-05-14 Thread David Holmes
This review is being spread across four groups: langtools, core-libs, hotspot and serviceability. This is the specific review thread for core-libs - webrev: http://cr.openjdk.java.net/~dholmes/8010319-JEP181/webrev.corelibs.v1/ See below for full details - including annotated full webrev

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread David Holmes
On 15/05/2018 7:56 AM, Paul Sandoz wrote: On May 14, 2018, at 2:04 PM, Martin Buchholz wrote: On Mon, May 14, 2018 at 1:45 PM, Paul Sandoz > wrote: On May 14, 2018, at 12:43 PM, Martin Buchholz

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Claes Redestad
On 2018-05-14 22:29, Ivan Gerasimov wrote: Thank you Claes! The mutator methods normally first update the modCount and then change the size of ArrayList. Then, in other methods the modCount is copied to a local variable first, and after that the size is copied. This is not true for

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Paul Sandoz
> On May 14, 2018, at 2:04 PM, Martin Buchholz wrote: > > > > On Mon, May 14, 2018 at 1:45 PM, Paul Sandoz > wrote: > > >> On May 14, 2018, at 12:43 PM, Martin Buchholz >

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Martin Buchholz
On Mon, May 14, 2018 at 1:45 PM, Paul Sandoz wrote: > > > On May 14, 2018, at 12:43 PM, Martin Buchholz wrote: > > > > On Mon, May 14, 2018 at 12:18 PM, Paul Sandoz > wrote: > >> >>> A CME is not necessarily associated with

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Paul Sandoz
> On May 14, 2018, at 12:43 PM, Martin Buchholz wrote: > > > > On Mon, May 14, 2018 at 12:18 PM, Paul Sandoz > wrote: >> >> A CME is not necessarily associated with just structural modifications it >> could, on

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Ivan Gerasimov
Thank you Claes! The mutator methods normally first update the modCount and then change the size of ArrayList. Then, in other methods the modCount is copied to a local variable first, and after that the size is copied. This is not true for equalsRange(List other, int from, int to) when it

Re: RFR: JDK-8200436 - String::isBlank

2018-05-14 Thread Xueming Shen
+1 On 5/14/18, 8:25 AM, Jim Laskey wrote: New string instance method that returns true if the string is empty or contains only white space, where white space is defined as any codepoint returns true when passed to Character::isWhitespace. webrev:

Re: RFR: JDK-8200436 - String::isBlank

2018-05-14 Thread Paul Sandoz
+1 Paul. > On May 14, 2018, at 8:25 AM, Jim Laskey wrote: > > New string instance method that returns true if the string is empty or > contains only white space, where white space is defined as any codepoint > returns true when passed to Character::isWhitespace. > >

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Martin Buchholz
On Mon, May 14, 2018 at 12:18 PM, Paul Sandoz wrote: > >> A CME is not necessarily associated with just structural modifications it >> could, on a best effort basis, be associated with any modification, which >> is cheaper to do for bulk operations rather than individual

Re: RFR: jsr166 jdk integration 2018-05

2018-05-14 Thread Paul Sandoz
> On May 11, 2018, at 9:33 AM, Martin Buchholz wrote: > > > > On Fri, May 11, 2018 at 9:06 AM, Paul Sandoz > wrote: > > >> On May 9, 2018, at 11:17 AM, Martin Buchholz >

Re: [PATCH] 8202521: Add overloaded methods of Map#compute, Map#computeIfAbsent, Map#computeIfPresent

2018-05-14 Thread Paul Sandoz
Hi Jacob, I do have one idea (that i don’t think is currently represented as a bug, though i have not searched JBS), if you are willing to take it on. It will require some investigation, and careful testing, it’s not necessarily a starter bug :-), but i can help guide. Investigate new methods

Re: RFR: JDK-8202788: Explicitly reclaim cached thread-local direct buffers at thread exit

2018-05-14 Thread Tony Printezis
Peter, In my proposal, you can register the exit hook in the ThreadLocal c’tor, so it’s almost as nice as Alan’s in that respect (and it doesn't require an extra field per ThreadLocal plus two extra fields per JdkEntry). :-) But, I do like the addition of the JdkEntry list to avoid unnecessarily

Re: RFR: JDK-8202788: Explicitly reclaim cached thread-local direct buffers at thread exit

2018-05-14 Thread Tony Printezis
Alan and Peter, First, I need to apologize: I completely missed Peter’s proposal (for some reason Peter’s follow-up e-mails show up blank on my mail client). Could someone point me to it so I can take a look? Re: having info per thread vs. globally: Having a couple more objects and a field

Re: Review Request JDK-8202113: Reflection API is causing caller classes to leak

2018-05-14 Thread Alan Bateman
On 14/05/2018 16:43, Peter Levart wrote: : Is it really that important to allow users to modify static final fields that way? As such fields are normally constant folded by JIT, I doubt that anybody is doing it nowadays. Doing it is bound to unpredictable program behavior, as JVM is free to

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Martin Buchholz
On Mon, May 14, 2018 at 7:33 AM, Claes Redestad wrote: > >> I would prefer having only one comodification check for a bulk operation, >> but I understand that checking at each step is more compatible with the >> default implementation. >> >> 594 for (int i =

Re: Review Request JDK-8202113: Reflection API is causing caller classes to leak

2018-05-14 Thread Peter Levart
On 05/11/2018 06:09 PM, mandy chung wrote: On 4/30/18 10:21 AM, Alan Bateman wrote: The updated webrev looks good. A minor comment is that I assume you can remove the cast from Executable::declaredAnnotations if you leave Executable::getRoot in place. It could but leave it as is.  I

RFR: JDK-8200436 - String::isBlank

2018-05-14 Thread Jim Laskey
New string instance method that returns true if the string is empty or contains only white space, where white space is defined as any codepoint returns true when passed to Character::isWhitespace. webrev: http://cr.openjdk.java.net/~jlaskey/8200436/webrev/index.html jbs:

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Claes Redestad
Martin, On 2018-05-14 16:15, Martin Buchholz wrote: Claes, Looks good. thanks! I would move the size check up to the beginning of the method. 583         int expectedModCount = modCount;  584         int otherModCount = other.modCount;  585         int s = size;  586         if (s !=

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Martin Buchholz
Claes, Looks good. I would move the size check up to the beginning of the method. 583 int expectedModCount = modCount; 584 int otherModCount = other.modCount; 585 int s = size; 586 if (s != other.size) { 587 return false; 588 } I would

Re: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList and ArrayList.SubList

2018-05-14 Thread Claes Redestad
Hi Ivan, right, checkForComodification() alone should be sufficient here. Updated in-place: http://cr.openjdk.java.net/~redestad/8196340/open.01/ Thanks! /Claes On 2018-05-12 03:38, Ivan Gerasimov wrote: Hi Claes! One thing I can't figure out is why both these two checks are necessary:

Re: RFR JDK-8200372 - String::trim JavaDoc should clarify meaning of space

2018-05-14 Thread Jim Laskey
Will add to the JDK-8200377 patch. Note that this pattern is also used in String::toLowerCase/String::toUpperCase (referenced I used.) Cheers, — Jim > On May 9, 2018, at 11:16 PM, James Laskey wrote: > > Will do. > > Sent from my iPhone > >> On May 9, 2018, at

Re: [JDK 11] RFR 8202763: failure_handler: list open files for macOS

2018-05-14 Thread Alan Bateman
On 14/05/2018 12:27, Amy Lu wrote: In case of test failures, open files information are collected on Linux (lsof) and Windows (openfiles) but not macOS. Please review the patch to add this information to macOS too, to help failure analysis. bug:

[JDK 11] RFR 8202763: failure_handler: list open files for macOS

2018-05-14 Thread Amy Lu
In case of test failures, open files information are collected on Linux (lsof) and Windows (openfiles) but not macOS. Please review the patch to add this information to macOS too, to help failure analysis. bug: https://bugs.openjdk.java.net/browse/JDK-8202763 webrev:

RFR Bug-pending: Enable Hotspot to Track Native Memory Usage for Direct Byte Buffers

2018-05-14 Thread Adam Farley8
Bump. Best Regards Adam Farley > On 13/04/2018 15:14, Adam Farley8 wrote: > >> Hi Alan, Peter, > >> > >> I see that native memory is tracked in java.nio.Bits, but that only includes what the user thinks they are allocating. > >> > >> When the VM adds extra memory to the allocation amount

Re: [PATCH] JDK-8159797 Throw a right IllegalArgumentException from the bytecode generated by Method/ConstructorAccessor

2018-05-14 Thread Jaikiran Pai
Mandy, thank you for reviewing this change. Comments inline. On 11/05/18 11:10 PM, mandy chung wrote: With your patch, IAE thrown with empty message is less desirable even though it does not provide less information than the current message (NPE::toString).   I wonder if we could define an