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

2018-05-14 Thread Remi Forax
Hi Louis, I prefer isBlank to isWhitespace, there is a notion of all characters in isBlank that you do not have with isWhitespace. Rémi - Mail original - > De: "Louis Wasserman" > À: "Xueming Shen" > Cc: "core-libs-dev" > Envoyé: Lundi 14 Mai 2018 22:15:50 > Objet: Re: RFR: JDK-820043

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: http://cr.openjdk.java.net/~jlaskey/

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 utili

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 >> > wrote: On May 14, 2018, at 12:43 PM, Martin Buchhol

[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 guidi

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 mailto:paul.san...@oracle.com>> wrote: On May 14, 2018, at 12:43 PM, Martin Buchholz mailto:marti...@google.com>> wrote: On Mon, May 14, 2018 at 12:18 PM, P

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 equal

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 > > wrote: >> >> >> >> On Mon, May 14, 2018 at 12:18 PM, Pa

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 just structural modifications >>> it could, on a best effort basis, be

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 a best effort basis, be associated with any modi

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: http://cr.openjdk.java.net/~jlaskey/8200436/we

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. > > webrev: http://cr.openjdk

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 operations, and >> this o

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 > > wrote: >> >> Time to do this, since Claes is also touching

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 per-th

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 n

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 = 0; i < s; i++) { >> 595

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 fou

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: https://bugs.openjdk.jav

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 != othe

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 pr

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: 130

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 10:38 PM, Stuart Marks wro

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: https://bugs.openjdk.java.net/browse/JDK-82027

[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: http://cr.openjdk.java.ne

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