Re: RFR: 8186958: Need method to create pre-sized HashMap [v14]

2022-04-12 Thread Stuart Marks
On Sun, 10 Apr 2022 20:28:16 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 17 commits: > > - Merge branch 'master' into fix_8186958 > -

Integrated: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Glavo
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-12 Thread liach
On Tue, 12 Apr 2022 22:15:22 GMT, XenoAmess wrote: > What subclasses of InputStream in the JDK do not override skip(n)? >From a peek, the majority of subclasses do not override `skip(long)`. Most >overrides are delegations or optimizations for random access structures; but >there are some

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-12 Thread liach
On Tue, 12 Apr 2022 22:19:18 GMT, XenoAmess wrote: >> @jmehrens what about this then? >> I think it safe now(actually this mechanism is learned from Reader) > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > add

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-12 Thread XenoAmess
On Tue, 12 Apr 2022 20:39:52 GMT, Roger Riggs wrote: > Without specific information about use cases, there isn't enough information > to craft a good algorithm/solution and simplicity is preferred. The > MAX_SKIP_BUFFER_SIZE is 2048 (not 8192). > > What subclasses of InputStream in the JDK do

Re: RFR: 8284638: store skip buffers in InputStream Object [v2]

2022-04-12 Thread XenoAmess
> @jmehrens what about this then? > I think it safe now(actually this mechanism is learned from Reader) XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add MIN_SKIP_BUFFER_SIZE - Changes: - all:

Withdrawn: 8284637: Improve String.join performance

2022-04-12 Thread XenoAmess
On Fri, 8 Apr 2022 19:33:26 GMT, XenoAmess wrote: > 8284637: Improve String.join performance This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/8169

Re: RFR: 8284637: Improve String.join performance [v2]

2022-04-12 Thread XenoAmess
On Mon, 11 Apr 2022 21:35:39 GMT, XenoAmess wrote: >> 8284637: Improve String.join performance > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > add jmh JMH results shows not worthy. closed. - PR:

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v5]

2022-04-12 Thread Claes Redestad
> A few additional enhancements aiming to improve VH performance in the > interpreter: > > - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase > 40->48) but removes an object and an indirection on any instance actually > used - and might avoid allocating the

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v5]

2022-04-12 Thread Joe Wang
On Tue, 12 Apr 2022 20:33:53 GMT, Naoto Sato wrote: >> Supporting `IsoFields` temporal fields in chronologies that are similar to >> ISO chronology. Corresponding CSR has also been drafted. > > Naoto Sato has updated the pull request with a new target base due to a merge > or a rebase. The

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v5]

2022-04-12 Thread Joe Wang
On Tue, 12 Apr 2022 20:33:53 GMT, Naoto Sato wrote: >> Supporting `IsoFields` temporal fields in chronologies that are similar to >> ISO chronology. Corresponding CSR has also been drafted. > > Naoto Sato has updated the pull request with a new target base due to a merge > or a rebase. The

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v4]

2022-04-12 Thread Claes Redestad
> A few additional enhancements aiming to improve VH performance in the > interpreter: > > - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase > 40->48) but removes an object and an indirection on any instance actually > used - and might avoid allocating the

Re: RFR: 8284638: store skip buffers in InputStream Object

2022-04-12 Thread Roger Riggs
On Tue, 12 Apr 2022 18:00:18 GMT, XenoAmess wrote: >> Is this change proposed as the result of some experience with particular >> apps and streams or just observation of the implementation? >> >> Is there any information about what kind of underlying streams do not >> support skip directly >>

Integrated: 8284771: java/util/zip/CloseInflaterDeflaterTest.java failed with "AssertionError: Expected IOException to be thrown, but nothing was thrown"

2022-04-12 Thread Ravi Reddy
On Tue, 12 Apr 2022 20:09:31 GMT, Ravi Reddy wrote: > CloseInflaterDeflaterTest.java is failing intermittently(Observed once in > macOS and Linux), testInflaterOutputStream() is added as an extra test as > part of https://bugs.openjdk.java.net/browse/JDK-8278794. Disabling this test > for now

Re: RFR: 8284771: java/util/zip/CloseInflaterDeflaterTest.java failed with "AssertionError: Expected IOException to be thrown, but nothing was thrown"

2022-04-12 Thread Lance Andersen
On Tue, 12 Apr 2022 20:09:31 GMT, Ravi Reddy wrote: > CloseInflaterDeflaterTest.java is failing intermittently(Observed once in > macOS and Linux), testInflaterOutputStream() is added as an extra test as > part of https://bugs.openjdk.java.net/browse/JDK-8278794. Disabling this test > for now

Re: RFR: 8279185: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate [v5]

2022-04-12 Thread Naoto Sato
> Supporting `IsoFields` temporal fields in chronologies that are similar to > ISO chronology. Corresponding CSR has also been drafted. Naoto Sato 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

RFR: 8284771: java/util/zip/CloseInflaterDeflaterTest.java failed with "AssertionError: Expected IOException to be thrown, but nothing was thrown"

2022-04-12 Thread Ravi Reddy
CloseInflaterDeflaterTest.java is failing intermittently(Observed once in macOS and Linux), testInflaterOutputStream() is added as an extra test as part of https://bugs.openjdk.java.net/browse/JDK-8278794. Disabling this test for now before debugging any timing issues in Inflater.

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-12 Thread Daniel Jeliński
On Fri, 8 Apr 2022 13:43:39 GMT, Alan Bateman wrote: > This is the implementation of JEP 425: Virtual Threads (Preview); TBD which > JDK version to target. > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v6]

2022-04-12 Thread Lance Andersen
On Tue, 12 Apr 2022 15:00:29 GMT, Volker Simonis wrote: >> Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` >> to highlight that it might write more bytes than the returned number of >> inflated bytes into the buffer `b`. >> >> The superclass `java.io.InputStream`

Re: RFR: 8284638: store skip buffers in InputStream Object

2022-04-12 Thread XenoAmess
On Mon, 11 Apr 2022 22:58:19 GMT, Roger Riggs wrote: > Is this change proposed as the result of some experience with particular apps > and streams or just observation of the implementation? just observation of the implementation of InputStream class and Reader class, and somehow wonder why

Integrated: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. This pull request has now been integrated. Changeset:

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. j.u.Random and j.u.SplittableRandom do _not_ expose

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Joe Darcy
On Tue, 12 Apr 2022 17:30:07 GMT, Jim Laskey wrote: > All generators support the byte[] however many ignore the argument. "If > byte[] seed is not supported by an > [algorithm](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/random/package-summary.html#algorithms) >

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Jim Laskey
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. All generators support the byte[] however many ignore

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. Not all random generators expose a (byte[])

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Joe Darcy
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. Are there any tests for corresponding issues in

Re: RFR: 8283870: jdeprscan --help causes an exception when the locale is ja, zh_CN or de [v2]

2022-04-12 Thread Naoto Sato
On Tue, 12 Apr 2022 06:36:29 GMT, Koichi Sakata wrote: >> # Summary >> Running jdeprscan with --help option causes an exception on any OSs when the >> locale is ja, zh_CN or de. >> >> # How to reproduce this issue >> >> $ jdeprscan -J-Duser.language=ja --help >> Exception in thread "main"

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-12 Thread Daniel Jeliński
On Fri, 8 Apr 2022 13:43:39 GMT, Alan Bateman wrote: > This is the implementation of JEP 425: Virtual Threads (Preview); TBD which > JDK version to target. > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Tesla I . Zhang‮
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v3]

2022-04-12 Thread Mandy Chung
On Mon, 11 Apr 2022 10:13:40 GMT, Claes Redestad wrote: >> A few additional enhancements aiming to improve VH performance in the >> interpreter: >> >> - Flatten `TypeAndInvokers`: adds a pointer to `VarHandle` (a small increase >> 40->48) but removes an object and an indirection on any

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Naoto Sato
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Joe Darcy
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Brian Burkhalter
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. Marked as reviewed by bpb (Reviewer). -

Re: RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Jim Laskey
On Tue, 12 Apr 2022 15:37:19 GMT, Raffaello Giulietti wrote: > Please review this tiny fix. > > A test similar to the code proposed by the bug reporter has been added for > the LXM group. It does not pass before the fix and passes after. Marked as reviewed by jlaskey (Reviewer).

RFR: 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed

2022-04-12 Thread Raffaello Giulietti
Please review this tiny fix. A test similar to the code proposed by the bug reporter has been added for the LXM group. It does not pass before the fix and passes after. - Commit messages: - 8283083: java.util.random L128X256MixRandom constructor fails to use byte[] seed Changes:

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Iris Clark
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Brian Burkhalter
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v6]

2022-04-12 Thread Volker Simonis
> Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` to > highlight that it might write more bytes than the returned number of > inflated bytes into the buffer `b`. > > The superclass `java.io.InputStream` specifies that `read(byte[] b, int off, > int len)` will leave

RFR: 8284742: Handle integral division overflow during parsing

2022-04-12 Thread Quan Anh Mai
Hi, This patch moves the handling of integral division overflow on x86 from code emission time to parsing time. This allows the compiler to perform more efficient transformations and also aids in achieving better code layout. I also removed the handling for division by 10 in the ad file since

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]

2022-04-12 Thread Volker Simonis
On Mon, 11 Apr 2022 16:04:48 GMT, Alan Bateman wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adapted wording and copyrights based on @jaikiran review > >

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]

2022-04-12 Thread Volker Simonis
On Mon, 11 Apr 2022 16:07:15 GMT, Alan Bateman wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adapted wording and copyrights based on @jaikiran review > >

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]

2022-04-12 Thread Volker Simonis
On Mon, 11 Apr 2022 16:05:33 GMT, Alan Bateman wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adapted wording and copyrights based on @jaikiran review > >

Re: RFR: 8284702: Add @since for java.time.LocalDate.EPOCH

2022-04-12 Thread Roger Riggs
On Tue, 12 Apr 2022 03:21:00 GMT, Glavo wrote: > `java.time.LocalDate.EPOCH` was introduced in Java 9, but there is no > corresponding `@since` in the javadoc. The absence of `@since` makes it > impossible for IDEs to check for misuse of it, it may be misused by users > targeting Java 8 and

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v3]

2022-04-12 Thread Jan Lahoda
> This is a (preliminary) patch for javac implementation for the third preview > of pattern matching for switch (type patterns in switches). > > Draft JLS: >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview)

2022-04-12 Thread Alan Bateman
On Mon, 11 Apr 2022 17:27:11 GMT, Daniel Fuchs wrote: > Not sure if that even matters - but there will be a slight change of > behaviour here if `InternalLock.CAN_USE_INTERNAL_LOCK` is ever `false`. > Instead of synchronizing on `in`, the `BufferedReader` will synchronize on > `this`. Good!

Re: RFR: 8283689: Update the foreign linker VM implementation [v3]

2022-04-12 Thread Jorn Vernee
> Hi, > > This PR updates the VM implementation of the foreign linker, by bringing over > commits from the panama-foreign repo. > > This is split off from the main JEP integration for 19, since we have limited > resources to handle this. As such, this PR might fall over to 20. > > I've

Re: RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v27]

2022-04-12 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-424 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/424 Maurizio Cimadamore has updated the pull

Re: RFR: 8282274: Compiler implementation for Pattern Matching for switch (Third Preview) [v2]

2022-04-12 Thread Jan Lahoda
> This is a (preliminary) patch for javac implementation for the third preview > of pattern matching for switch (type patterns in switches). > > Draft JLS: >

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v6]

2022-04-12 Thread Raffaello Giulietti
On Tue, 8 Feb 2022 22:11:34 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited to adhere to OpenJDK code conventions about

Re: RFR: 8275535: Retrying a failed authentication on multiple LDAP servers can lead to users blocked

2022-04-12 Thread Daniel Fuchs
On Tue, 12 Apr 2022 01:17:37 GMT, Andrew John Hughes wrote: > What's the status of this? The last comment reads as if this is good to go. I believe we're still waiting for Martin to reply to the last comment: > Maybe, you could also log a bug for a test addition and describe in it an >

Re: RFR: 4511638: Double.toString(double) sometimes produces incorrect results [v6]

2022-04-12 Thread zimmermann6
On Tue, 8 Feb 2022 22:11:34 GMT, Raffaello Giulietti wrote: >> Hello, >> >> here's a PR for a patch submitted on March 2020 >> [1](https://cr.openjdk.java.net/~bpb/4511638/webrev.04/) when Mercurial was >> a thing. >> >> The patch has been edited to adhere to OpenJDK code conventions about

Re: RFR: 8284579: Improve VarHandle checks for interpreter [v3]

2022-04-12 Thread Claes Redestad
On Tue, 12 Apr 2022 01:15:33 GMT, David Holmes wrote: > > checkExactAccessMode -> checkAccessModeThenIsDirect > > Don't you still want "Exact" in there? That "access" check seems odd anyway > as it only checks for one form of mismatch - should it not also check for > `!exact &&

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]

2022-04-12 Thread Alan Bateman
On Tue, 12 Apr 2022 07:10:54 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 347: >> >>> 345: * >>> 346: * @implNote This implementation returns an instance of >>> 347: * {@link java.util.zip.InflaterInputStream}. >> >> What is the

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v5]

2022-04-12 Thread Jaikiran Pai
On Mon, 11 Apr 2022 16:03:08 GMT, Alan Bateman wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adapted wording and copyrights based on @jaikiran review > > src/java.base/share/classes/java/util/zip/ZipFile.java

Re: RFR: 8283870: jdeprscan --help causes an exception when the locale is ja, zh_CN or de

2022-04-12 Thread Koichi Sakata
On Mon, 11 Apr 2022 05:31:49 GMT, Koichi Sakata wrote: > # Summary > Running jdeprscan with --help option causes an exception on any OSs when the > locale is ja, zh_CN or de. > > # How to reproduce this issue > > $ jdeprscan -J-Duser.language=ja --help > Exception in thread "main"

Re: RFR: 8283870: jdeprscan --help causes an exception when the locale is ja, zh_CN or de [v2]

2022-04-12 Thread Koichi Sakata
> # Summary > Running jdeprscan with --help option causes an exception on any OSs when the > locale is ja, zh_CN or de. > > # How to reproduce this issue > > $ jdeprscan -J-Duser.language=ja --help > Exception in thread "main" java.lang.IllegalArgumentException: can't parse > argument number: