Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v2]

2023-11-10 Thread Martin Doerr
On Thu, 9 Nov 2023 04:16:25 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 17:34:48 GMT, Daniel Fuchs wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Multiple improvements to Gatherer and Gatherers javadoc and restructuring >> of Gatherers.java to put public at the

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 16:25:44 GMT, Alan Bateman wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Multiple improvements to Gatherer and Gatherers javadoc and restructuring >> of Gatherers.java to put public at the

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 09:32:17 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Multiple improvements to Gatherer and

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Wed, 8 Nov 2023 17:15:11 GMT, Rémi Forax wrote: >> @amaembo In this case, given that it is intended as Preview, I think it >> makes sense to receive some user feedback on this. Note that Collector has >> been without PECS for Collector.of since 1.8: >>

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 17:21:23 GMT, Daniel Fuchs wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Multiple improvements to Gatherer and Gatherers javadoc and restructuring >> of Gatherers.java to put public at the

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 17:10:56 GMT, Daniel Fuchs wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Multiple improvements to Gatherer and Gatherers javadoc and restructuring >> of Gatherers.java to put public at the

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 16:48:34 GMT, Alan Bateman wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Multiple improvements to Gatherer and Gatherers javadoc and restructuring >> of Gatherers.java to put public at the

Re: RFR: JDK-8315458 Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview) [v16]

2023-11-10 Thread Jim Laskey
On Fri, 10 Nov 2023 20:00:28 GMT, Jim Laskey wrote: >> Address changes from JEP 445 to JEP 463. >> >> - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. >> >> - Don't mark class on read. >> >> - Remove reflection and annotation processing related to unnamed classes. >> >> -

Re: RFR: JDK-8315458 JEP 463: Implementation of Implicitly Declared Classes and Instance Main Method (Second Preview) [v16]

2023-11-10 Thread Jim Laskey
> Address changes from JEP 445 to JEP 463. > > - Move from a SYNTHETIC unnamed class to a MANDATED implicit class. > > - Don't mark class on read. > > - Remove reflection and annotation processing related to unnamed classes. > > - Simplify main method search. Jim Laskey has updated the pull

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v2]

2023-11-10 Thread Raffaello Giulietti
On Thu, 9 Nov 2023 04:16:25 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Daniel Fuchs
On Fri, 10 Nov 2023 09:32:17 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Multiple improvements to Gatherer and

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-10 Thread Magnus Ihse Bursie
On Mon, 30 Oct 2023 10:54:48 GMT, suchismith1993 wrote: > 1. Adding required compiler flags. > 2. Adding required symbols. > > JBS-ISSUE : [JDK-8317799](https://bugs.openjdk.org/browse/JDK-8317799) Not even using `nm` on the libraries in question? The file seem to be consumed by the compiler,

Re: RFR: 8319928: Exceptions thrown by cleanup actions passed to reinterpreted segments should be ignored

2023-11-10 Thread Maurizio Cimadamore
On Fri, 10 Nov 2023 16:59:09 GMT, Alan Bateman wrote: > @tprinzing This may be an area that you want to look at sometime to see if a > JFR event might make sense. Might make sense - I suggest that should be done also for Cleaner - as that's using same mechanism (and no JFR events)

Re: RFR: 8319928: Exceptions thrown by cleanup actions passed to reinterpreted segments should be ignored

2023-11-10 Thread Alan Bateman
On Fri, 10 Nov 2023 16:34:11 GMT, Maurizio Cimadamore wrote: > This simplePR tweaks the factory which wraps custom cleanup actions passed to > `MemorySegment::reinterpret`, so that any exception thrown by the custom > cleanup is swallowed when the arena is closed. > > This aligns the

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Alan Bateman
On Fri, 10 Nov 2023 09:32:17 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Multiple improvements to Gatherer and

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v8]

2023-11-10 Thread Pavel Rappo
On Tue, 7 Nov 2023 07:58:40 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals, hashCode, and compareTo for BigInteger. If you have any performance >> concerns, please raise them. >> >> This PR is cherry-picked from a bigger,

RFR: 8319928: Exceptions thrown by cleanup actions passed to reinterpreted segments should be ignored

2023-11-10 Thread Maurizio Cimadamore
This simplePR tweaks the factory which wraps custom cleanup actions passed to `MemorySegment::reinterpret`, so that any exception thrown by the custom cleanup is swallowed when the arena is closed. This aligns the behavior of confined/shared session with that of implicit session (as implicit

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v2]

2023-11-10 Thread Roger Riggs
On Fri, 10 Nov 2023 14:59:57 GMT, Raffaello Giulietti wrote: >> Roger Riggs has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Refactored extractCodePoints to avoid multiple resizes if the array was >> modified >> - Replaced

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-10 Thread suchismith1993
On Fri, 10 Nov 2023 15:48:59 GMT, Magnus Ihse Bursie wrote: > > Which directory do you suggest to put the exports list in ? Do we create a > > new directory or use any existing directory. > > My initial thinking is like Erik's, that this list should be dynamically > generated at build-time. I

Re: RFR: 8319820: Use unnamed variables in the FFM implementation

2023-11-10 Thread Maurizio Cimadamore
On Fri, 10 Nov 2023 07:19:42 GMT, Per Minborg wrote: > This PR proposes to use unnamed variables now that they have become available > in Java. > > There is also a cosmetic cleanup making a switch rake smaller and where > variables are pre-calculated rather than spreading expressions around.

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-10 Thread Magnus Ihse Bursie
On Fri, 10 Nov 2023 07:54:40 GMT, suchismith1993 wrote: > Which directory do you suggest to put the exports list in ? Do we create a > new directory or use any existing directory. My initial thinking is like Erik's, that this list should be dynamically generated at build-time. I am pretty

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs [v2]

2023-11-10 Thread Yakov Shafranovich
> The various Zip/Jar-file related Java APIs have some long-standing > differences or peculiarities with respect to the ZIP-file specification or > compared to other implementations which should be documented in the API-doc. > This documents the following: > - Cache of JAR files in

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs [v2]

2023-11-10 Thread Yakov Shafranovich
On Thu, 9 Nov 2023 20:43:25 GMT, Kevin Driver wrote: >> Yakov Shafranovich has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Fixed more line breaks >> - fixed line breaks > > src/jdk.zipfs/share/classes/module-info.java line 303: > >>

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs

2023-11-10 Thread Yakov Shafranovich
On Thu, 9 Nov 2023 20:42:52 GMT, Kevin Driver wrote: >> The various Zip/Jar-file related Java APIs have some long-standing >> differences or peculiarities with respect to the ZIP-file specification or >> compared to other implementations which should be documented in the API-doc. >> This

Re: RFR: JDK-8319122: Improve documentation of various Zip-file related APIs

2023-11-10 Thread Yakov Shafranovich
On Thu, 9 Nov 2023 20:41:22 GMT, Kevin Driver wrote: >> The various Zip/Jar-file related Java APIs have some long-standing >> differences or peculiarities with respect to the ZIP-file specification or >> compared to other implementations which should be documented in the API-doc. >> This

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v2]

2023-11-10 Thread Raffaello Giulietti
On Thu, 9 Nov 2023 04:16:25 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Integrated: 8319882: SequenceLayout::toString throws ArithmeticException

2023-11-10 Thread Per Minborg
On Fri, 10 Nov 2023 09:31:29 GMT, Per Minborg wrote: > This PR proposes to fix a problem where a sequence layout contains an element > of `byteSize()` zero. This pull request has now been integrated. Changeset: c9657cad Author:Per Minborg URL:

JDK-8249280: Calling toLocalDateTime() on an invalid java.sql.Timestamp throws

2023-11-10 Thread Petr Janeček
Hello! This is meant as a comment on JDK-8249280 (Date and Timestamp valueOf wrong for BCE years) and/or JDK-8272194 (java.sql.Date::toLocalDate() broken for dates before 1 A.D.) as I can't comment directly. The direct consequence of the bug is that using big negative timestamps it's possible to

Re: Provide thread-safe and concurrent sequenced collections with insertion order?

2023-11-10 Thread Sebastian Fischer
Hi Stuart. Thanks, I understand now how the limited thread safety of "synchronized" wrappers has led to not adding new ones. My use case is an LRU-cache that is accessed by a large number of (virtual) threads. In my initial implementation I constructed a LinkedHashMap passing true for the

Re: RFR: 8319882: SequenceLayout::toString throws ArithmeticException

2023-11-10 Thread Maurizio Cimadamore
On Fri, 10 Nov 2023 09:31:29 GMT, Per Minborg wrote: > This PR proposes to fix a problem where a sequence layout contains an element > of `byteSize()` zero. Marked as reviewed by mcimadamore (Reviewer). src/java.base/share/classes/jdk/internal/foreign/layout/SequenceLayoutImpl.java line 182:

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v2]

2023-11-10 Thread Viktor Klang
On Fri, 10 Nov 2023 09:38:51 GMT, Tagir F. Valeev wrote: >> Viktor Klang has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Addressing review feedback >> - Make Gatherer.andThen take a wildcard for the rhs Gatherer state type > >

Integrated: 8319174: Enhance robustness of some j.m.BigInteger constructors

2023-11-10 Thread Raffaello Giulietti
On Wed, 1 Nov 2023 12:32:24 GMT, Raffaello Giulietti wrote: > Enhance `java.math.BigInteger` constructors taking a `byte[]` argument by > improving guarantees of internal invariants. This pull request has now been integrated. Changeset: a64fc48e Author:Raffaello Giulietti URL:

RFR: 8319882: SequenceLayout::toString throws ArithmeticException

2023-11-10 Thread Per Minborg
This PR proposes to fix a problem where a sequence layout contains an element of `byteSize()` zero. - Commit messages: - Fix toString problem Changes: https://git.openjdk.org/jdk/pull/16599/files Webrev: https://webrevs.openjdk.org/?repo=jdk=16599=00 Issue:

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v2]

2023-11-10 Thread Tagir F . Valeev
On Wed, 8 Nov 2023 21:08:03 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with two additional > commits since the last revision: > > - Addressing review feedback > - Make

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v3]

2023-11-10 Thread Viktor Klang
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) Viktor Klang has updated the pull request incrementally with two additional commits since the last revision: - Multiple improvements to Gatherer and Gatherers javadoc and restructuring of Gatherers.java to put public at

Re: RFR: 8304446: javap --system flag doesn't override system APIs [v3]

2023-11-10 Thread Adam Sotona
> Javap ignores --system option when searching for JDK classes. > This patch prepends search over JDK system modules. > > Please review. > > Thanks, > Adam Adam Sotona has updated the pull request incrementally with one additional commit since the last revision: applied suggested changes

Re: RFR: 8304446: javap --system flag doesn't override system APIs [v2]

2023-11-10 Thread Adam Sotona
On Fri, 10 Nov 2023 07:28:30 GMT, Jan Lahoda wrote: > Is there a chance for a jtreg test? Unfortunately I haven't found a simple way to include a different JDK as `--system` for the test. Any suggestions are welcome. - PR Comment:

Re: RFR: 8304446: javap --system flag doesn't override system APIs [v2]

2023-11-10 Thread Adam Sotona
On Fri, 10 Nov 2023 07:25:45 GMT, Jan Lahoda wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Skip search over JDK modules for classes in unnamed package (mainly to >> skip JDK module-infos) > >

Re: RFR: 8316493: Remove the caching fields in AbstractMap [v11]

2023-11-10 Thread Per Minborg
> This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the same time, performance is likely improved > because

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-10 Thread suchismith1993
On Thu, 9 Nov 2023 17:46:20 GMT, Erik Joelsson wrote: > For some context: `java.lang.foreign.Linker.nativeLinker().defaultLookup()` > returns a `SymbolLookup` that can be used to find symbols from the standard > library. > > We use a shim library that re-exports symbols from the standard

Re: RFR: JDK-8317799 : AIX PPC64: FFI symbol lookup doesn't find symbols

2023-11-10 Thread suchismith1993
On Wed, 8 Nov 2023 21:11:32 GMT, Magnus Ihse Bursie wrote: > First and foremost, the `make/data/hotspot-symbols` directory is, as the name > says, for hotspot symbols. These are not hotspot symbols. If you really do > need the file, then it needs to reside in a proper location. > > Secondly: