Re: RFR: 8265356: need code example for getting canonical constructor of a Record

2021-04-23 Thread Tagir F . Valeev
On Tue, 20 Apr 2021 17:42:27 GMT, Stuart Marks wrote: >> I decided to show a complete static method in the example, so it could be >> copied to user utility class as is. Not sure if it's reasonable to add >> `assert cls.isRecord();` there. Also I don't know whether there's a >> limitation on m

Re: RFR: 8265356: need code example for getting canonical constructor of a Record [v2]

2021-04-23 Thread Tagir F . Valeev
> I decided to show a complete static method in the example, so it could be > copied to user utility class as is. Not sure if it's reasonable to add > `assert cls.isRecord();` there. Also I don't know whether there's a > limitation on max characters in the sample code. Probable a line break in

Re: New Collections interface - Sized

2021-04-23 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "Stephen Colebourne" > > Cc: "core-libs-dev" > Envoyé: Samedi 24 Avril 2021 00:40:54 > Objet: Re: New Collections interface - Sized >> This is basically Spliterator, an iterator + a size, with the iterator is >> "push" >> inste

Re: New Collections interface - Sized

2021-04-23 Thread Remi Forax
- Mail original - > De: "Stephen Colebourne" > À: "core-libs-dev" > Envoyé: Vendredi 23 Avril 2021 11:23:03 > Objet: New Collections interface - Sized > Hi all, > While a discussion on ReversibleCollection is going on, I'd like to > raise the interface I've always found most missing from

Re: New Collections interface - Sized

2021-04-23 Thread Brian Goetz
This is basically Spliterator, an iterator + a size, with the iterator is "push" instead of "pull" because it's more efficient. In details a Spliterator is either - an Iterable (with no SIZED characteristic) - an Iterable + size (if SIZED and estimateSize() != Long.MAX_VALUE) - an Iterable +

Re: New Collections interface - Sized

2021-04-23 Thread Remi Forax
- Mail original - > De: "Stephen Colebourne" > À: "core-libs-dev" > Envoyé: Samedi 24 Avril 2021 00:14:51 > Objet: Re: New Collections interface - Sized > On Fri, 23 Apr 2021 at 23:07, Brian Goetz wrote: >> >> Is there a compelling example of where this would be used by clients? >> > He

Re: New Collections interface - Sized

2021-04-23 Thread Stephen Colebourne
On Fri, 23 Apr 2021 at 23:07, Brian Goetz wrote: > >> Is there a compelling example of where this would be used by clients? > > Here are some examples: > > https://stackoverflow.com/questions/10988634/java-global-isempty-method > Without passing judgment on the sort of dynamically typed programs t

Re: New Collections interface - Sized

2021-04-23 Thread Brian Goetz
Is there a compelling example of where this would be used by clients? Here are some examples: https://stackoverflow.com/questions/10988634/java-global-isempty-method Without passing judgment on the sort of dynamically typed programs that need a method like this, or wondering what monstrositie

Re: New Collections interface - Sized

2021-04-23 Thread Stephen Colebourne
On Fri, 23 Apr 2021 at 17:08, Brian Goetz wrote: > This has come up before. For example, during an early iteration of the > Stream design, before parallelism entered the picture. The first > scrawled-on-a-napkin prototype for streams was based on Iterator, and it took > about a minute to real

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-23 Thread Alan Snyder
On Apr 21, 2021, at 11:40 AM, Alan Bateman wrote: > > Sure, if you are using native code then you have the full power of JVM TI and > JNI available. Project Panama is exploring how to restrict access to native > code, I think too early to say how this might extend to JNI. I looked at some of t

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v9]

2021-04-23 Thread Brian Burkhalter
On Sat, 13 Mar 2021 14:28:25 GMT, Philippe Marschall wrote: >> Implement three optimiztations for Reader.read(CharBuffer) >> >> * Add a code path for heap buffers in Reader#read to use the backing array >> instead of allocating a new one. >> * Change the code path for direct buffers in Reader#

Integrated: 8264208: Console charset API

2021-04-23 Thread Naoto Sato
On Fri, 9 Apr 2021 16:47:55 GMT, Naoto Sato wrote: > Please review the changes for the subject issue. This has been suggested in > a recent discussion thread for the JEP 400 > [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. > A CSR has also been drafted, a

Re: RFR: 8264208: Console charset API [v12]

2021-04-23 Thread Alan Bateman
On Thu, 22 Apr 2021 17:38:43 GMT, Naoto Sato wrote: >> Please review the changes for the subject issue. This has been suggested in >> a recent discussion thread for the JEP 400 >> [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. >> A CSR has also been draft

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II) [v2]

2021-04-23 Thread Lance Andersen
On Fri, 23 Apr 2021 15:38:53 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> This PR was split into two parts due to the large number of files affected. >

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II) [v2]

2021-04-23 Thread Roger Riggs
On Fri, 23 Apr 2021 15:38:53 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> This PR was split into two parts due to the large number of files affected. >

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II) [v2]

2021-04-23 Thread Naoto Sato
On Fri, 23 Apr 2021 15:38:53 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> This PR was split into two parts due to the large number of files affected. >

Re: New Collections interface - Sized

2021-04-23 Thread Brian Goetz
This has come up before.  For example, during an early iteration of the Stream design, before parallelism entered the picture.  The first scrawled-on-a-napkin prototype for streams was based on Iterator, and it took about a minute to realize that we could do a much better job if we had a slight

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II) [v2]

2021-04-23 Thread Chris Hegarty
On Fri, 23 Apr 2021 15:38:53 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> This PR was split into two parts due to the large number of files affected. >

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II) [v2]

2021-04-23 Thread Patrick Concannon
> Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Kind regards, > > Patrick Patrick Concannon has updated the pu

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Chris Hegarty
On Fri, 23 Apr 2021 10:44:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Ki

Re: RFR: 8265137: java.util.Random suddenly has new public methods nowhere documented [v6]

2021-04-23 Thread Uwe Schindler
On Wed, 21 Apr 2021 13:13:16 GMT, Jim Laskey wrote: >> Move makeXXXSpilterator from public (@hidden) to protected. No API ch > > Jim Laskey has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Roger Riggs
On Fri, 23 Apr 2021 10:44:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Ki

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Lance Andersen
On Fri, 23 Apr 2021 10:44:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Ki

Re: RFR: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Daniel Fuchs
On Fri, 23 Apr 2021 10:44:30 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of the `instanceof` pattern variable? > > This PR was split into two parts due to the large number of files affected. > > Ki

RFR: 8265746: Update java.time to use instanceof pattern variable (part II)

2021-04-23 Thread Patrick Concannon
Hi, Could someone please review the second half of my update for the `java.time` package to make use of the `instanceof` pattern variable? This PR was split into two parts due to the large number of files affected. Kind regards, 
Patrick - Commit messages: - 8265746: Update java.

New Collections interface - Sized

2021-04-23 Thread Stephen Colebourne
Hi all, While a discussion on ReversibleCollection is going on, I'd like to raise the interface I've always found most missing from the framework - Sized public interface Sized { int size(); default boolean isEmpty() { return size() == 0; } default boolean isNotEmpty() { ret

Re: ReversibleCollection proposal

2021-04-23 Thread Stephen Colebourne
On Fri, 23 Apr 2021 at 07:33, Stuart Marks wrote: > On 4/22/21 8:36 AM, Stephen Colebourne wrote: > Having these methods on Collection could lead to a situation where calling > addFirst > and then getFirst might result in getFirst returning a different element from > what > was passed to addFirs