Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16 [v2]

2022-06-17 Thread Naoto Sato
> This is a regression caused by the fix to > [JDK-8286287](https://bugs.openjdk.org/browse/JDK-8286287), which assumed the > method `String.decodeWithDecoder()` was only invoked with cs.REPLACE mode > based on the comment "should not happen". Possibly this refers to the > `String(byte[], int,

Re: RFR: 8287809: Revisit implementation of memory session [v4]

2022-06-17 Thread Maurizio Cimadamore
On Fri, 17 Jun 2022 20:39:40 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert implicit vs. heap session changes > >

Re: RFR: 8287971: Throw exception for missing values in .jpackage.xml [v3]

2022-06-17 Thread Alexander Matveev
On Fri, 17 Jun 2022 17:01:10 GMT, Alexey Semenyuk wrote: >> Alexander Matveev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8287971: Throw exception for missing values in .jpackage.xml [v3] > >

Re: RFR: 8287809: Revisit implementation of memory session [v4]

2022-06-17 Thread Maurizio Cimadamore
On Fri, 17 Jun 2022 18:39:03 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: >> https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/9017__;!!ACWV5N9M2RV99hQ!PTgf-96nF99J6u5zXvgIK8gDa_y-GwCjRZ0uALQAk5zZJ7sIb8lIrdasF6oRY-U2YqR3JXkv4CFtxlWidLpOuYm5qPP4KA$ >> > >

Re: RFR: 8287809: Revisit implementation of memory session [v4]

2022-06-17 Thread Maurizio Cimadamore
> This is a JDK 19 clone of: > https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/9017__;!!ACWV5N9M2RV99hQ!JbqlSnOAQCnoGfGjSR9ODas1vyjzkF4ONduTcHSVCWdjG3CB4-ZhX8llEZg_0mu3-AqmRhVAWY5lZS-IDBMIEaKzWm2ckQ$ > Maurizio Cimadamore has updated the pull request incrementally with one

Re: RFR: 8287809: Revisit implementation of memory session [v3]

2022-06-17 Thread Maurizio Cimadamore
> This is a JDK 19 clone of: > https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/9017__;!!ACWV5N9M2RV99hQ!Iad5ZYIBKo6G8OmmBEpmRZekLOyVUfHNgi9JARpVmrUedI3fLRC3VvMwy4h-WDdnsbZ71KGxv99JP5gzdsD4RP7upCEDuQ$ > Maurizio Cimadamore has updated the pull request incrementally with one

Re: RFR: 8287809: Revisit implementation of memory session [v2]

2022-06-17 Thread Maurizio Cimadamore
> This is a JDK 19 clone of: > https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/9017__;!!ACWV5N9M2RV99hQ!PURf47Tx3IHsn4r3Q6t3YUMp-kirS2J1rdJ0hx_W3gPaJy1oHsJ_LsQEmyMD_isGigYq82vk18K6ERWiCmNns5bTKx4HWA$ > Maurizio Cimadamore has updated the pull request with a new target base due

Re: RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Lance Andersen
On Fri, 17 Jun 2022 16:33:16 GMT, Lance Andersen wrote: > Hi all, > > Please review this patch for JDK 19 to address a broken link due to PKWare > moving the location for APPNOTE.txt > > Best, > Lance > I've never communicated with pkware, but this might be a good first time to > email

Re: RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Martin Buchholz
On Fri, 17 Jun 2022 16:33:16 GMT, Lance Andersen wrote: > Hi all, > > Please review this patch for JDK 19 to address a broken link due to PKWare > moving the location for APPNOTE.txt > > Best, > Lance I've never communicated with pkware, but this might be a good first time to email

Re: RFR: 8278863: Add method ClassDesc::ofInternalName [v2]

2022-06-17 Thread Jorn Vernee
On Fri, 17 Jun 2022 17:03:52 GMT, Adam Sotona wrote: >> The symbolic constants API (`java.lang.constant`) was designed, in part, to >> provide bytecode parsing and generation APIs with a validated, common, >> symbolic form for constants in Java class files. >> >> There is an easy way to

Re: RFR: 8278863: Add method ClassDesc::ofInternalName [v2]

2022-06-17 Thread Adam Sotona
On Fri, 17 Jun 2022 15:01:16 GMT, Jorn Vernee wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update test/jdk/java/lang/constant/ClassDescTest.java >> >> Co-authored-by: Jorn Vernee > >

Re: RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Lance Andersen
On Fri, 17 Jun 2022 16:55:50 GMT, Martin Buchholz wrote: > I would change to the imperfect > https://urldefense.com/v3/__https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT__;!!ACWV5N9M2RV99hQ!L1f8haAwUq1MetDxmR_stKKymXfm_VGE_xJ2TysCslYfBFNeeOKsTJNxGKCLYvCx5cH9SCYL47Qgd7XTqMZkrT8$ > >

Re: RFR: 8278863: Add method ClassDesc::ofInternalName [v2]

2022-06-17 Thread Adam Sotona
> The symbolic constants API (`java.lang.constant`) was designed, in part, to > provide bytecode parsing and generation APIs with a validated, common, > symbolic form for constants in Java class files. > > There is an easy way to create a `ClassDesc` from a binary name > (`ClassDesc::of`) or

Re: RFR: 8287971: Throw exception for missing values in .jpackage.xml [v3]

2022-06-17 Thread Alexey Semenyuk
On Fri, 17 Jun 2022 04:07:47 GMT, Alexander Matveev wrote: >> - Error will be thrown if app image is generated with another JDK version or >> has malformed .jpackage.xml. >> - Re-fixed as Alexey suggested in >>

Integrated: JDK-8288573: Make Executable.getParameterCount() actually abstract

2022-06-17 Thread Joe Darcy
On Thu, 16 Jun 2022 21:21:36 GMT, Joe Darcy wrote: > Whatever the motivation for how this method was coded when added in JDK 8, > since Executable is now a sealed class with Constructor and Method the only > allowed subclasses, getParameterCount can be coded as an normal abstract > method.

Re: RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Naoto Sato
On Fri, 17 Jun 2022 16:33:16 GMT, Lance Andersen wrote: > Hi all, > > Please review this patch for JDK 19 to address a broken link due to PKWare > moving the location for APPNOTE.txt > > Best, > Lance Would the link

Re: RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Martin Buchholz
On Fri, 17 Jun 2022 16:33:16 GMT, Lance Andersen wrote: > Hi all, > > Please review this patch for JDK 19 to address a broken link due to PKWare > moving the location for APPNOTE.txt > > Best, > Lance I would change to the imperfect

RFR: 8288596: Random:from() adapter does not delegate to supplied generator in all cases

2022-06-17 Thread Raffaello Giulietti
Extend delegation by instance returned by Random.from() to all methods exposed by RandomGenerator. - Commit messages: - 8288596: Random:from() adapter does not delegate to supplied generator in all cases Changes: https://git.openjdk.org/jdk19/pull/36/files Webrev:

RFR: 8288527: broken link in java.base/java/util/zip/package-summary.html

2022-06-17 Thread Lance Andersen
Hi all, Please review this patch for JDK 19 to address a broken link due to PKWare moving the location for APPNOTE.txt Best, Lance - Commit messages: - Address broken linke for APPNOTE.txt Changes: https://git.openjdk.org/jdk19/pull/35/files Webrev:

Re: RFR: JDK-8288573: Make Executable.getParameterCount() actually abstract [v2]

2022-06-17 Thread Joe Darcy
> Whatever the motivation for how this method was coded when added in JDK 8, > since Executable is now a sealed class with Constructor and Method the only > allowed subclasses, getParameterCount can be coded as an normal abstract > method. (The implementation of getParameterCount in Method and

Re: RFR: 8288589: Files.readString ignores encoding errors for UTF-16

2022-06-17 Thread Naoto Sato
On Fri, 17 Jun 2022 10:43:31 GMT, Alan Bateman wrote: > Files.readString has been broken several times by the changes in to String in > this area. Would it be possible to survey the tests that we have for this > method, esp. the error cases, to see if we need more tests. I looked for similar

Re: RFR: 8288628: Unnecessary Hashtable usage in ConditionalSpecialCasing

2022-06-17 Thread Naoto Sato
On Wed, 15 Jun 2022 19:49:52 GMT, Andrey Turbanov wrote: > If a thread-safe implementation is not needed, it is recommended to use > HashMap in place of Hashtable. > `ConditionalSpecialCasing.entryTable` is read-only Map which is modified only > in `static` block. It means we can safely

Re: RFR: 8288667: Reduce runtime of java.text microbenchmarks

2022-06-17 Thread Jorn Vernee
On Fri, 17 Jun 2022 12:59:17 GMT, Claes Redestad wrote: > - Refactor micro using a range of parameters to a simpler benchmark that > tests different values in one pass > - Reduce iterations and their runtimes, but add forks (important to be able > to detect run-to-run variation anomalies) > >

Re: RFR: 8278863: Add method ClassDesc::ofInternalName

2022-06-17 Thread Jorn Vernee
On Fri, 17 Jun 2022 14:19:11 GMT, Adam Sotona wrote: > The symbolic constants API (`java.lang.constant`) was designed, in part, to > provide bytecode parsing and generation APIs with a validated, common, > symbolic form for constants in Java class files. > > There is an easy way to create a

Re: RFR: JDK-8266670: Better modeling of access flags in core reflection [v30]

2022-06-17 Thread Rémi Forax
On Fri, 17 Jun 2022 14:42:22 GMT, Roger Riggs wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add module-related tests. > > src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 428: > >> 426:

Re: RFR: JDK-8266670: Better modeling of access flags in core reflection [v30]

2022-06-17 Thread Roger Riggs
On Fri, 17 Jun 2022 03:10:47 GMT, Joe Darcy wrote: >> This is an early review of changes to better model JVM access flags, that is >> "modifiers" like public, protected, etc. but explicitly at a VM level. >> >> Language level modifiers and JVM level access flags are closely related, but >>

RFR: 8278863: Add method ClassDesc::ofInternalName

2022-06-17 Thread Adam Sotona
The symbolic constants API (`java.lang.constant`) was designed, in part, to provide bytecode parsing and generation APIs with a validated, common, symbolic form for constants in Java class files. There is an easy way to create a `ClassDesc` from a binary name (`ClassDesc::of`) or a field

Fwd: Bug JDK-8176553

2022-06-17 Thread Sean Mullan
[reposting to core-libs-dev as this is in the JNDI/LDAP component] Forwarded Message Subject: Bug JDK-8176553 Date: Fri, 17 Jun 2022 14:23:11 +0200 From: Ricardo Martin Camarero To: security-...@openjdk.org Hi! I decided to send an email to the security-dev email list as

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v4]

2022-06-17 Thread liach
On Fri, 17 Jun 2022 11:17:18 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/reflect/Executable.java line 777: >> >>> 775: } >>> 776: >>> 777: record ParameterData(Parameter[] parameters, boolean real) {} >> >> The `ParameterData.parameters` field can probably be 

Re: RFR: 8287760: --do-not-resolve-by-default gets overwritten if --warn-if-resolved flags is used [v9]

2022-06-17 Thread Christian Stein
On Fri, 10 Jun 2022 18:28:46 GMT, Thiago Henrique Hüpner wrote: >> 8287760: --do-not-resolve-by-default gets overwritten if --warn-if-resolved >> flags is used > > Thiago Henrique Hüpner has updated the pull request incrementally with one > additional commit since the last revision: > >

Integrated: Merge jdk19

2022-06-17 Thread Jesper Wilhelmsson
On Fri, 17 Jun 2022 12:16:32 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 19 -> JDK 20 This pull request has now been integrated. Changeset: af64d316 Author:Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/af64d316c0f687c4ceab7591e050449c64e3babc Stats: 50 lines

RFR: 8288667: Reduce runtime of java.text microbenchmarks

2022-06-17 Thread Claes Redestad
- Refactor micro using a range of parameters to a simpler benchmark that tests different values in one pass - Reduce iterations and their runtimes, but add forks (important to be able to detect run-to-run variation anomalies) Just one micro modified in this package, but reduces total runtime

RFR: Merge jdk19

2022-06-17 Thread Jesper Wilhelmsson
Forwardport JDK 19 -> JDK 20 - Commit messages: - Merge - 8286176: Add JNI_VERSION_19 to jni.h and JNI spec - 8287401: jpackage tests failing on Windows due to powershell issue - 8288534: Out of bound errors for memory segment access mentions wrong values The merge commit only

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v4]

2022-06-17 Thread Сергей Цыпанов
> If there are two threads calling `Executable.hasRealParameterData()` under > race and the first one writes into volatile `Executable.parameters` field > (doing _releasing store_) and the second thread reads non-null value from the > same field (doing acquiring read) then it must read exactly

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v4]

2022-06-17 Thread Сергей Цыпанов
On Fri, 17 Jun 2022 10:31:39 GMT, ExE Boss wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8288327: Mark ParameterData.parameters as @Stable and rename real -> isReal > >

Re: RFR: JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract

2022-06-17 Thread ExE Boss
On Thu, 16 Jun 2022 21:21:36 GMT, Joe Darcy wrote: > Whatever the motivation for how this method was coded when added in JDK 8, > since Executable is now a sealed class with Constructor and Method the only > allowed subclasses, getParameterCount can be coded as an normal abstract > method.

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Jaikiran Pai
On Fri, 17 Jun 2022 06:50:24 GMT, Johannes Kuhn wrote: >> src/java.base/share/classes/java/util/random/RandomGeneratorFactory.java >> line 165: >> >>> 163: onlyBuiltIn = p -> >>> VM.isSystemDomainLoader(p.type().getClassLoader()); >>> 164: } else { >>> 165:

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v2]

2022-06-17 Thread Сергей Цыпанов
On Fri, 17 Jun 2022 06:27:12 GMT, liach wrote: >> Another approach would be to keep the parameter array and the boolean in a >> record, and mark the record field as stable, possibly like what's done in >> #6889. Keeping them in a record like: >> >> record ParameterData(Parameter[] parameters,

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v3]

2022-06-17 Thread Сергей Цыпанов
> If there are two threads calling `Executable.hasRealParameterData()` under > race and the first one writes into volatile `Executable.parameters` field > (doing _releasing store_) and the second thread reads non-null value from the > same field (doing acquiring read) then it must read exactly

Java Logging Documentation

2022-06-17 Thread Hiran Chaudhuri
Hello there. Switching from log4j2 towards Java Logging (one dependency less), I notice that the documentation at https://docs.oracle.com/en/java/javase/18/core/java-logging-overview.html#GUID-B83B652C-17EA-48D9-93D2-563AE1FF8EDA is not very useful to me. While I know very well how to configure

Re: RFR: JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract

2022-06-17 Thread Jaikiran Pai
On Thu, 16 Jun 2022 21:21:36 GMT, Joe Darcy wrote: > Whatever the motivation for how this method was coded when added in JDK 8, > since Executable is now a sealed class with Constructor and Method the only > allowed subclasses, getParameterCount can be coded as an normal abstract > method.

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Jaikiran Pai
On Fri, 17 Jun 2022 07:10:02 GMT, Johannes Kuhn wrote: > But that is outside the scope of this bug Agreed. I'm not expecting that to be changed in this PR :) It was more a general question about the implementation. - PR: https://git.openjdk.org/jdk/pull/9180

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Johannes Kuhn
On Fri, 17 Jun 2022 07:04:47 GMT, Jaikiran Pai wrote: >> * This adds additional permissions to the jdk.random module >> (`RuntimePermission "accessClassInPackage.jdk.internal.util.random"`) >> * The annotations of the provider classes are now parsed early. >> This avoids putting the parts

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Jaikiran Pai
On Thu, 16 Jun 2022 07:08:20 GMT, Johannes Kuhn wrote: > * This adds additional permissions to the jdk.random module > (`RuntimePermission "accessClassInPackage.jdk.internal.util.random"`) > * The annotations of the provider classes are now parsed early. > This avoids putting the parts that

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Jaikiran Pai
On Thu, 16 Jun 2022 07:08:20 GMT, Johannes Kuhn wrote: > * This adds additional permissions to the jdk.random module > (`RuntimePermission "accessClassInPackage.jdk.internal.util.random"`) > * The annotations of the provider classes are now parsed early. > This avoids putting the parts that

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Johannes Kuhn
On Fri, 17 Jun 2022 06:47:59 GMT, Jaikiran Pai wrote: >> * This adds additional permissions to the jdk.random module >> (`RuntimePermission "accessClassInPackage.jdk.internal.util.random"`) >> * The annotations of the provider classes are now parsed early. >> This avoids putting the parts

Re: RFR: JDK-8288475: Initializing RandomGeneratorFactory.FactoryMapHolder fails if a SecurityManager is installed

2022-06-17 Thread Jaikiran Pai
On Thu, 16 Jun 2022 07:08:20 GMT, Johannes Kuhn wrote: > * This adds additional permissions to the jdk.random module > (`RuntimePermission "accessClassInPackage.jdk.internal.util.random"`) > * The annotations of the provider classes are now parsed early. > This avoids putting the parts that

Re: RFR: JDK-8288573: Make `java.lang.reflect.Executable::getParameterCount()' actually abstract

2022-06-17 Thread Alan Bateman
On Thu, 16 Jun 2022 21:21:36 GMT, Joe Darcy wrote: > Whatever the motivation for how this method was coded when added in JDK 8, > since Executable is now a sealed class with Constructor and Method the only > allowed subclasses, getParameterCount can be coded as an normal abstract > method.

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v2]

2022-06-17 Thread liach
On Fri, 17 Jun 2022 06:14:32 GMT, liach wrote: >> src/java.base/share/classes/java/lang/reflect/Executable.java line 453: >> >>> 451: >>> 452: private transient boolean hasRealParameterData; >>> 453: private transient volatile Parameter[] parameters; >> >> These can probably be 

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v2]

2022-06-17 Thread liach
On Fri, 17 Jun 2022 05:34:25 GMT, ExE Boss wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8288327: Add clarifying comments > > src/java.base/share/classes/java/lang/reflect/Executable.java line 453: > >> 451:

Re: Handling of USR2 signal in JVM on Linux

2022-06-17 Thread Thomas Stüfe
> > > > > > > > I see your point. I dislike crashes, especially ones they can be > > > reliably triggered from outside. You never can be sure about the > > > security implications either. > > > > > > If you dislike ignoring the signal, and since the default action for > > > SIGUSR1+2 is process

Integrated: 8286176: Add JNI_VERSION_19 to jni.h and JNI spec

2022-06-17 Thread Alan Bateman
On Sat, 11 Jun 2022 15:42:34 GMT, Alan Bateman wrote: > JNI is updated in Java 19 so we need to define JNI_VERSION_19 and change > GetVersion to return this version. > > test/hotspot/jtreg/native_sanity/JniVersion.java is updated to check that > JNI_VERSION_19 is returned. The native library