Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-10 Thread Jaikiran Pai
On Thu, 10 Feb 2022 22:08:27 GMT, Joe Darcy wrote: >> src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java >> line 197: >> >>> 195: // Predicate above covers enum constants, including >>> 196: // those with specialized class

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library [v2]

2022-02-10 Thread Athijegannathan Sundararajan
On Fri, 11 Feb 2022 03:49:45 GMT, Mandy Chung wrote: >> This patch removes the restriction in the raw library loading mechanism that >> does not allow mix-n-match of loading a library as a JNI library and as a >> raw library. >> >> The raw library loading mechanism is designed for panama to

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread Mandy Chung
On Fri, 11 Feb 2022 02:08:27 GMT, liach wrote: >> Worth a try. Even the regular class, the constructor taking 5 fields isn't >> too bad to me. In a near future, I hope to remove the old core reflection >> implementation, `noInflation` and `inflationThreshold` will be removed and >> fewer

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library [v2]

2022-02-10 Thread Mandy Chung
> This patch removes the restriction in the raw library loading mechanism that > does not allow mix-n-match of loading a library as a JNI library and as a raw > library. > > The raw library loading mechanism is designed for panama to load native > library essentially equivalent to

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library [v2]

2022-02-10 Thread Mandy Chung
On Fri, 11 Feb 2022 02:38:08 GMT, Athijegannathan Sundararajan wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comment > > src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java line 58: > >>

Re: RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library

2022-02-10 Thread Athijegannathan Sundararajan
On Thu, 10 Feb 2022 23:27:49 GMT, Mandy Chung wrote: > This patch removes the restriction in the raw library loading mechanism that > does not allow mix-n-match of loading a library as a JNI library and as a raw > library. > > The raw library loading mechanism is designed for panama to load

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread liach
On Thu, 10 Feb 2022 22:49:38 GMT, Mandy Chung wrote: >> Can I just write the config class as a record, or does it generate too much >> boilerplate? Or is this class initialized too early to use records (such as >> indy is not yet ready)? > > Worth a try. Even the regular class, the

Re: RFR: 8176706: Additional Date-Time Formats [v3]

2022-02-10 Thread Naoto Sato
On Thu, 10 Feb 2022 22:20:48 GMT, Roger Riggs wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed LocalizedPrinterParser.toString() to reflect requestedTemplate > >

Re: RFR: 8176706: Additional Date-Time Formats [v4]

2022-02-10 Thread Naoto Sato
> Following the prior discussion [1], here is the PR for the subject > enhancement. CSR has also been updated according to the suggestion. > > [1] > https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-January/085175.html Naoto Sato has updated the pull request incrementally with one

RFR: 8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library

2022-02-10 Thread Mandy Chung
This patch removes the restriction in the raw library loading mechanism that does not allow mix-n-match of loading a library as a JNI library and as a raw library. The raw library loading mechanism is designed for panama to load native library essentially equivalent to dlopen/dlclose calls

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread David Holmes
On Thu, 10 Feb 2022 15:39:53 GMT, Leo Korinth wrote: > Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Forgot to mention copyright years need updating before integrating! Thanks. - PR:

Re: RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread David Holmes
On Thu, 10 Feb 2022 15:39:53 GMT, Leo Korinth wrote: > Remove unused imports under test/lib and jtreg/gc. They create lots of > warnings if editing using an IDE. Tests in hotspot_gc passed. Looks fine. The proof of these changes is in compiling the files - how did you test the non-gc-test

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread Mandy Chung
On Thu, 10 Feb 2022 22:21:32 GMT, liach wrote: >> src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java line >> 672: >> >>> 670: private final boolean disableSerialConstructorChecks; >>> 671: >>> 672: private Config(boolean getProperties) { >> >> I suggest

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v6]

2022-02-10 Thread liach
> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), > by design, duplicate initialization of ReflectionFactory should be safe as it > performs side-effect-free property read actions, and the suggesting of making > the `initted` field volatile cannot prevent concurrent

Re: RFR: 8176706: Additional Date-Time Formats [v3]

2022-02-10 Thread Roger Riggs
On Tue, 8 Feb 2022 19:08:45 GMT, Naoto Sato wrote: >> Following the prior discussion [1], here is the PR for the subject >> enhancement. CSR has also been updated according to the suggestion. >> >> [1] >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-January/085175.html > > Naoto

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread liach
On Thu, 10 Feb 2022 19:45:24 GMT, Mandy Chung wrote: >> liach 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 merge/rebase. The pull request contains seven additional commits >> since

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-10 Thread Joe Darcy
On Thu, 10 Feb 2022 14:04:01 GMT, Jaikiran Pai wrote: > Hello Joe, would it be better to use the new syntax for `instanceof` here to > avoid the subsequent cast? > > ``` > else if (value instanceof Enum v) > > return toSourceString(v); > ``` Fair point; updated in subsequent push.

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-10 Thread Joe Darcy
On Thu, 10 Feb 2022 14:56:46 GMT, Sam Brannen wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java >

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]

2022-02-10 Thread Joe Darcy
> Two changes to the toString output for annotations to give better source > fidelity: > > 1) For enum constants, call their name method rather than their toString > method. An enum class can override the toString method to print something > other than the name. > > 2) Switch from using

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-10 Thread Lance Andersen
On Thu, 10 Feb 2022 20:37:50 GMT, Sean Mullan wrote: >> Agree on returning null to maintain current behavior. I would also lean >> towards amending the specification to specify what has been long-standing >> behavior. > > If we had to do it over again, I do think throwing IAE is more

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-10 Thread Lance Andersen
> Hi all, > > Please review the attached patch to address > > - That JarFile::getInputStream did not check for a null ZipEntry passed as a > parameter > - Have Zip/JarFile::getInputStream throw a ZipException in the event that an > unexpected exception occurs > > Mach5 tiers1-3 runs are clean

Re: RFR: 8176706: Additional Date-Time Formats [v3]

2022-02-10 Thread Roger Riggs
On Tue, 8 Feb 2022 19:08:45 GMT, Naoto Sato wrote: >> Following the prior discussion [1], here is the PR for the subject >> enhancement. CSR has also been updated according to the suggestion. >> >> [1] >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2022-January/085175.html > > Naoto

Re: RFR: 8281259: MutableBigInteger subtraction could be simplified

2022-02-10 Thread Brian Burkhalter
On Fri, 4 Feb 2022 10:13:28 GMT, Daniel Jeliński wrote: > The proposed form of borrow bit handling is [already used in BigInteger > class](https://github.com/djelinski/jdk/blob/ce26a19be5e907c11164b46f1bcb370b534d5bf6/src/java.base/share/classes/java/math/BigInteger.java#L1558). > > JMH

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-10 Thread Sean Mullan
On Thu, 10 Feb 2022 20:35:19 GMT, Sean Mullan wrote: >> So a bit more on this. If the ZipEntry passed to `ZipFile::getInputStream` >> does not represent an entry within the current Zip/Jar, >> `ZipFile::getInputStream` will return a null for the InputStream: >> >> >> @Test >>

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-10 Thread Sean Mullan
On Wed, 9 Feb 2022 21:16:08 GMT, Lance Andersen wrote: >>> Nit, add space after "if" >> >> will fix > > So a bit more on this. If the ZipEntry passed to `ZipFile::getInputStream` > does not represent an entry within the current Zip/Jar, > `ZipFile::getInputStream` will return a null for the

Re: RFR: 8281259: MutableBigInteger subtraction could be simplified

2022-02-10 Thread Daniel Jeliński
On Fri, 4 Feb 2022 10:13:28 GMT, Daniel Jeliński wrote: > The proposed form of borrow bit handling is [already used in BigInteger > class](https://github.com/djelinski/jdk/blob/ce26a19be5e907c11164b46f1bcb370b534d5bf6/src/java.base/share/classes/java/math/BigInteger.java#L1558). > > JMH

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread Mandy Chung
On Thu, 10 Feb 2022 02:24:43 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making

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

2022-02-10 Thread Daniel Fuchs
On Thu, 10 Feb 2022 15:25:09 GMT, Aleksei Efimov wrote: > I'm ok with pushing the fix without a test given that the user will verify it > in his real environment. > Maybe, you could also log a bug for a test addition and describe in it an > environment, and sort of a high-level scenario of how

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts [v2]

2022-02-10 Thread Paul Sandoz
On Thu, 10 Feb 2022 15:14:44 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch implements the unsigned upcast intrinsics in x86, which are used >> in vector lane-wise reinterpreting operations. >> >> Thank you very much. > > Quan Anh Mai has updated the pull request incrementally with two

Integrated: 8281294: [vectorapi] FIRST_NONZERO reduction operation throws IllegalArgumentExcept on zero vectors

2022-02-10 Thread Paul Sandoz
On Wed, 9 Feb 2022 21:36:01 GMT, Paul Sandoz wrote: > …ArgumentExcept on zero vectors > > This PR fixes issues for reduction using FIRST_NONZERO and adds tests. The > testing infrastructure is generalized to reduction functions and tests for > min/max reductions are updated to use that. This

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts [v2]

2022-02-10 Thread Paul Sandoz
On Thu, 10 Feb 2022 15:14:44 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch implements the unsigned upcast intrinsics in x86, which are used >> in vector lane-wise reinterpreting operations. >> >> Thank you very much. > > Quan Anh Mai has updated the pull request incrementally with two

Re: HashMap.putAll can cause redundant space waste

2022-02-10 Thread Xeno Amess
bug reported as 9072610 pr open at https://github.com/openjdk/jdk/pull/7431 I investigated most of the usages. They just give a size, and get a capacity, even not change the 0.75 So maybe we can use some int calculation to replace the 0.75, thus replace Math.ceil for such situations. The only

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread Peter Levart
On Thu, 10 Feb 2022 13:36:11 GMT, liach wrote: >> liach 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 merge/rebase. The pull request contains seven additional commits >> since the

Re: RFR: 8281146: Replace StringCoding.hasNegatives with countPositives

2022-02-10 Thread Martin Doerr
On Wed, 26 Jan 2022 12:51:31 GMT, Claes Redestad wrote: > I'm requesting comments and, hopefully, some help with this patch to replace > `StringCoding.hasNegatives` with `countPositives`. The new method does a very > similar pass, but alters the intrinsic to return the number of leading bytes

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used

2022-02-10 Thread Jonathan Gibbons
On Thu, 10 Feb 2022 11:24:23 GMT, Lance Andersen wrote: >> Perhaps like this? >> >> >> /** >> * ... >> * @provides java.util.spi.ToolProvider >> * Module {@code jdk.jartool} provides a tool named {@code "jar"}. >> * Invoke {@link java.util.spi.ToolProvider#findFirst >>

Re: RFR: 8281259: MutableBigInteger subtraction could be simplified

2022-02-10 Thread Brian Burkhalter
On Fri, 4 Feb 2022 10:13:28 GMT, Daniel Jeliński wrote: > The proposed form of borrow bit handling is [already used in BigInteger > class](https://github.com/djelinski/jdk/blob/ce26a19be5e907c11164b46f1bcb370b534d5bf6/src/java.base/share/classes/java/math/BigInteger.java#L1558). > > JMH

Re: RFR: 8280915: Better parallelization for AbstractSpliterator and IteratorSpliterator when size is unknown [v4]

2022-02-10 Thread Paul Sandoz
On Thu, 10 Feb 2022 04:22:34 GMT, Tagir F. Valeev wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Benchmark to demonstrate the patch usefulness > > I added a microbenchmark to demonstrate the speed improvement

RFR: 8281585: Remove unused imports under test/lib and jtreg/gc

2022-02-10 Thread Leo Korinth
Remove unused imports under test/lib and jtreg/gc. They create lots of warnings if editing using an IDE. Tests in hotspot_gc passed. - Commit messages: - 8281585: Remove unused imports under test/lib and jtreg/gc Changes: https://git.openjdk.java.net/jdk/pull/7426/files Webrev:

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

2022-02-10 Thread Aleksei Efimov
On Wed, 9 Feb 2022 19:47:19 GMT, Martin Balao wrote: > Thanks, that was what I initially thought but wanted to check if I was > missing something else given the previous discussion. I should be able to > generate a build for the user and ask him to test in his real environment. As > for the

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts [v2]

2022-02-10 Thread Quan Anh Mai
On Thu, 10 Feb 2022 05:05:05 GMT, Jatin Bhateja wrote: >> Quan Anh Mai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - minor rename >> - address reviews > > src/hotspot/cpu/x86/x86.ad line 7288: > >> 7286: break; >> 7287:

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts [v2]

2022-02-10 Thread Quan Anh Mai
On Wed, 9 Feb 2022 22:52:47 GMT, Sandhya Viswanathan wrote: >> Quan Anh Mai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - minor rename >> - address reviews > > src/hotspot/cpu/x86/assembler_x86.cpp line 4782: > >> 4780:

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts [v2]

2022-02-10 Thread Quan Anh Mai
> Hi, > > This patch implements the unsigned upcast intrinsics in x86, which are used > in vector lane-wise reinterpreting operations. > > Thank you very much. Quan Anh Mai has updated the pull request incrementally with two additional commits since the last revision: - minor rename -

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input

2022-02-10 Thread Sam Brannen
On Thu, 10 Feb 2022 05:49:47 GMT, Joe Darcy wrote: > Two changes to the toString output for annotations to give better source > fidelity: > > 1) For enum constants, call their name method rather than their toString > method. An enum class can override the toString method to print something >

Re: RFR: JDK-8281462: Annotation toString output for enum not reusable for source input

2022-02-10 Thread Jaikiran Pai
On Thu, 10 Feb 2022 05:49:47 GMT, Joe Darcy wrote: > Two changes to the toString output for annotations to give better source > fidelity: > > 1) For enum constants, call their name method rather than their toString > method. An enum class can override the toString method to print something >

Re: RFR: 8261407: ReflectionFactory.checkInitted() is not thread-safe [v5]

2022-02-10 Thread liach
On Thu, 10 Feb 2022 02:24:43 GMT, liach wrote: >> Upon review of [8261407](https://bugs.openjdk.java.net/browse/JDK-8261407), >> by design, duplicate initialization of ReflectionFactory should be safe as >> it performs side-effect-free property read actions, and the suggesting of >> making

Re: Seeking inputs on 8224794: ZipFile/JarFile should open zip/JAR file with FILE_SHARE_DELETE sharing mode on Windows

2022-02-10 Thread Jaikiran Pai
Thank you Daniel for your inputs. I'll stop any further investigation/work on this one and update the JBS issue with the details of the investigation so far. -Jaikiran On 04/02/22 10:55 pm, Daniel Fuchs wrote: Hi Jaikiran, Thanks for working on this and apologies for the long silence. I

Re: RFR: 8278173: [vectorapi] Add x64 intrinsics for unsigned (zero extended) casts

2022-02-10 Thread Jatin Bhateja
On Sat, 5 Feb 2022 15:34:08 GMT, Quan Anh Mai wrote: > Hi, > > This patch implements the unsigned upcast intrinsics in x86, which are used > in vector lane-wise reinterpreting operations. > > Thank you very much. src/hotspot/cpu/x86/x86.ad line 7288: > 7286: break; > 7287:

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used

2022-02-10 Thread Lance Andersen
On Thu, 10 Feb 2022 03:04:43 GMT, Christian Stein wrote: >> What is "it" in "it provides..." ? > > Perhaps like this? > > > /** > * ... > * @provides java.util.spi.ToolProvider > * Module {@code jdk.jartool} provides a tool named {@code "jar"}. > * Invoke {@link

Sequenced Collections

2022-02-10 Thread Remi Forax
I've read the draft of the JEP on sequenced collection, and i think the proposed design can be improved. https://bugs.openjdk.java.net/browse/JDK-8280836 I agree with the motivation, there is a need for an API to consider the element of a list, a sorted set and a linked hash set as an ordered