Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Florian Weimer
On Tue, 3 Nov 2020 01:33:32 GMT, Stuart Marks wrote: > This change introduces a new terminal operation on Stream. This looks like a > convenience method for Stream.collect(Collectors.toList()) or > Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this > method directly on

Re: RFR: 8254742: InputStream::readNBytes(int) result may contain zeros not in input

2020-11-03 Thread Aleksey Shipilev
On Tue, 3 Nov 2020 00:04:58 GMT, Brian Burkhalter wrote: > InputStream::readNBytes() invokes read(byte[],int,int) repeatedly to load > bytes into a sequence of intermediate arrays. If an intermediate array is not > completely filled before being added to the list of arrays the contents of >

RFR: 8255798: Remove dead headless code in CompileJavaModules.gmk

2020-11-03 Thread Magnus Ihse Bursie
The variable BUILD_HEADLESS_ONLY is no longer set. And sun/applet does not exist anymore. - Commit messages: - 8255798: Remove dead headless code in CompileJavaModules.gmk Changes: https://git.openjdk.java.net/jdk/pull/1031/files Webrev:

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stephen Colebourne
On Tue, 3 Nov 2020 01:33:32 GMT, Stuart Marks wrote: > This change introduces a new terminal operation on Stream. This looks like a > convenience method for Stream.collect(Collectors.toList()) or > Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this > method directly on

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Daniel Fuchs
On Tue, 3 Nov 2020 01:33:32 GMT, Stuart Marks wrote: > This change introduces a new terminal operation on Stream. This looks like a > convenience method for Stream.collect(Collectors.toList()) or > Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this > method directly on

Re: RFR: 8255226: (tz) Upgrade time-zone data to tzdata2020d [v2]

2020-11-03 Thread Kiran Sidhartha Ravikumar
> Hi Guys, > > Please review the integration of tzdata2020d to JDK. > > Details regarding the change can be viewed at - > https://mm.icann.org/pipermail/tz-announce/2020-October/62.html > Bug: https://bugs.openjdk.java.net/browse/JDK-8255226 > > TestZoneInfo310.java test failure is

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 04:18:08 > Objet: RFR: 8180352: Add Stream.toList() method > This change introduces a new terminal operation on Stream. This looks like a > convenience method for

Re: RFR: 8255226: (tz) Upgrade time-zone data to tzdata2020d [v3]

2020-11-03 Thread Kiran Sidhartha Ravikumar
> Hi Guys, > > Please review the integration of tzdata2020d to JDK. > > Details regarding the change can be viewed at - > https://mm.icann.org/pipermail/tz-announce/2020-October/62.html > Bug: https://bugs.openjdk.java.net/browse/JDK-8255226 > > TestZoneInfo310.java test failure is

Re: RFR: 8255226: (tz) Upgrade time-zone data to tzdata2020d [v2]

2020-11-03 Thread Kiran Sidhartha Ravikumar
On Tue, 3 Nov 2020 00:21:16 GMT, Naoto Sato wrote: >> Thanks for getting back Naoto, I believe this is a long-standing issue - >> https://bugs.openjdk.java.net/browse/JDK-8227293. >> >> Looking back at the integration of tzdata2019a/tzdata2019b, the same issue >> was addressed by updating the

Integrated: 8255374: Add a dropReturn MethodHandle combinator

2020-11-03 Thread Jorn Vernee
On Mon, 26 Oct 2020 15:18:08 GMT, Jorn Vernee wrote: > Hi, > > This patch adds a `dropReturn` combinator to `MethodHandles` that can be used > to create a new method handle that drops the return value, from a given > method handle. Similar to the following code: > > MethodHandle target =

Re: RFR: 8247781: Day periods support [v5]

2020-11-03 Thread Naoto Sato
> Hi, > > Please review the changes for the subject issue. This is to enhance the > java.time package to support day periods, such as "in the morning", defined > in CLDR. It will add a new pattern character 'B' and its supporting builder > method. The motivation and its spec are in this CSR: >

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stuart Marks
On Tue, 3 Nov 2020 10:58:25 GMT, Stephen Colebourne wrote: >> This change introduces a new terminal operation on Stream. This looks like a >> convenience method for Stream.collect(Collectors.toList()) or >> Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this >> method

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Brian Goetz
There is no value in making users remember which stream methods are null-hostile and which are null-tolerant; this is just more accidental complexity. I think that ship has sailed a long ago. Some collectors are null hostile, some are not. You can make a point that a Collector is technically

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stuart Marks
On Tue, 3 Nov 2020 10:06:26 GMT, Daniel Fuchs wrote: >> This change introduces a new terminal operation on Stream. This looks like a >> convenience method for Stream.collect(Collectors.toList()) or >> Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this >> method

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "Stuart Marks" > Cc: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 19:02:37 > Objet: Re: RFR: 8180352: Add Stream.toList() method >>> This change introduces a new terminal operation on Stream. This looks like a >>> convenience

Integrated: 8255380: (zipfs) ZipFileSystem::readExtra can fail if zipinfo-time is not set to false

2020-11-03 Thread Lance Andersen
On Sun, 1 Nov 2020 20:09:32 GMT, Lance Andersen wrote: > Hi, > > Please review the fix for JDK-8255380 which addresses an issue when the Zip > file is > 4GB. Zip FS when processing the CEN extra data does not take into > account the fact that there is no specific order to how the extra data

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Brian Goetz
This change introduces a new terminal operation on Stream. This looks like a convenience method for Stream.collect(Collectors.toList()) or Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this method directly on Stream enables it to do what can't easily by done by a

Re: RFR: 8255226: (tz) Upgrade time-zone data to tzdata2020d [v3]

2020-11-03 Thread Naoto Sato
On Tue, 3 Nov 2020 15:49:09 GMT, Kiran Sidhartha Ravikumar wrote: >> Hi Guys, >> >> Please review the integration of tzdata2020d to JDK. >> >> Details regarding the change can be viewed at - >> https://mm.icann.org/pipermail/tz-announce/2020-October/62.html >> Bug:

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stuart Marks
On Tue, 3 Nov 2020 11:05:21 GMT, Stephen Colebourne wrote: >> This change introduces a new terminal operation on Stream. This looks like a >> convenience method for Stream.collect(Collectors.toList()) or >> Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this >> method

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread John Rose
I agree with Stuart and Brian that streams should be null-tolerant, including in this case. And of course I’m delighted to see an immutable container as the output to the utility method; I’m a fan of reduced-copy, race-free, bug-resistant algorithms you get from immutability. On Nov 3, 2020, at

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Aaron Scott-Boddendijk
>>> But it can not be immutable too, for the same reason. >> Nope. The spec of toList() very clearly says: no guarantees as to the type, >> mutability, serializability, etc etc of the returned list. That doesn't mean >> that every method returning a List added to the JDK after Collectors::toList

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
Hi Aaron, > De: "Aaron Scott-Boddendijk" > À: "Remi Forax" > Cc: "Brian Goetz" , "Stuart Marks" > , "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 21:59:37 > Objet: Re: RFR: 8180352: Add Stream.toList() method > >>> But it can not be immutable too, for the same reason. > >> Nope. The spec

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Remi Forax
- Mail original - > De: "Martin Desruisseaux" > À: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 23:16:49 > Objet: Re: RFR: 8180352: Add Stream.toList() method > Hello > > Le 03/11/2020 à 21:30, fo...@univ-mlv.fr a écrit : > >> You know that you can not change the implementation of

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
> De: "Brian Goetz" > À: "Remi Forax" > Cc: "Stuart Marks" , "core-libs-dev" > > Envoyé: Mardi 3 Novembre 2020 20:54:57 > Objet: Re: RFR: 8180352: Add Stream.toList() method >>> There is no value in making users remember which stream methods are >>> null-hostile and which are null-tolerant;

Re: RFR: 8253892: Disable misleading-indentation on clang as well as gcc

2020-11-03 Thread John Paul Adrian Glaubitz
On Tue, 3 Nov 2020 22:25:08 GMT, Magnus Ihse Bursie wrote: > With clang 10.0, the compiler now detects a new class of warnings. The > `misleading-indentation` warning has previously been disabled on gcc for > hotspot and libfdlibm. Now we need to disable it for clang as well. Why do we

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Martin Desruisseaux
Hello Le 03/11/2020 à 21:30, fo...@univ-mlv.fr a écrit : You know that you can not change the implementation of Collectors.toList(), and you also know that if there is a method Stream.toList(), people will replace the calls to .collect(Collectors.toList()) by a call to Stream.toList() for

RFR: 8253892: Disable misleading-indentation on clang as well as gcc

2020-11-03 Thread Magnus Ihse Bursie
With clang 10.0, the compiler now detects a new class of warnings. The `misleading-indentation` warning has previously been disabled on gcc for hotspot and libfdlibm. Now we need to disable it for clang as well. - Commit messages: - 8253892: Disable misleading-indentation on

Re: RFR: 8253892: Disable misleading-indentation on clang as well as gcc

2020-11-03 Thread Magnus Ihse Bursie
On Tue, 3 Nov 2020 22:36:34 GMT, John Paul Adrian Glaubitz wrote: >> With clang 10.0, the compiler now detects a new class of warnings. The >> `misleading-indentation` warning has previously been disabled on gcc for >> hotspot and libfdlibm. Now we need to disable it for clang as well. > >

RFR: 8255862: Remove @SuppressWarnings from sun.misc.Unsafe

2020-11-03 Thread Mandy Chung
Record classes are now a standard feature in 16. @SuppressWarnings can be removed from sun.misc.Unsafe. - Commit messages: - 8255862: Remove @SuppressWarnings from sun.misc.Unsafe Changes: https://git.openjdk.java.net/jdk/pull/1049/files Webrev:

RFR: 8255863: Clean up test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java

2020-11-03 Thread Mandy Chung
test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java tests a record class. This test no longer needs to be run with --enable-preview. - Commit messages: - 8255863: Clean up test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java Changes:

Re: RFR: 8254742: InputStream::readNBytes(int) result may contain zeros not in input

2020-11-03 Thread Brent Christian
On Tue, 3 Nov 2020 00:04:58 GMT, Brian Burkhalter wrote: > InputStream::readNBytes() invokes read(byte[],int,int) repeatedly to load > bytes into a sequence of intermediate arrays. If an intermediate array is not > completely filled before being added to the list of arrays the contents of >

Re: RFR: 8254742: InputStream::readNBytes(int) result may contain zeros not in input

2020-11-03 Thread Brent Christian
On Tue, 3 Nov 2020 08:56:38 GMT, Aleksey Shipilev wrote: >> InputStream::readNBytes() invokes read(byte[],int,int) repeatedly to load >> bytes into a sequence of intermediate arrays. If an intermediate array is >> not completely filled before being added to the list of arrays the contents >>

Re: RFR: JDK-8253936 Replace ... with {@code ...} for java.sql [v2]

2020-11-03 Thread Vipin Sharma
> ... is replaced with {@code ...} in java.sql classes. > Please review and sponsor this change. Vipin Sharma has updated the pull request incrementally with one additional commit since the last revision: Updated copyright year and other issues reporrted in review - Changes: -

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stuart Marks
On 11/3/20 3:10 AM, Florian Weimer wrote: I'd expect a test here that if the list contains a null element, `List::copyOf` throws `NullPointerException`. The new Stream.toList() actually permits null elements (by design) so it goes through a different path than List::copyOf. The new tests'

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Stuart Marks
On Tue, 3 Nov 2020 18:53:23 GMT, Stuart Marks wrote: >> Should there be a test that tests the default implementation in >> `j.u.s.Stream`? Or maybe there is and I missed that? > > @dfuch wrote: >> Should there be a test that tests the default implementation in >> `j.u.s.Stream`? Or maybe there

Re: RFR: 8254162: Implementation of Foreign-Memory Access API (Third Incubator)

2020-11-03 Thread Alan Bateman
On Mon, 2 Nov 2020 11:26:51 GMT, Maurizio Cimadamore wrote: >> I looked through the changes in this update. >> >> The shared memory segment support looks sound and the mechanism to close a >> shared memory segment is clever (albeit a bit surprising at first that it >> does global handshake