Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v3]

2021-09-28 Thread Phil Race
On Wed, 29 Sep 2021 03:39:09 GMT, Phil Race wrote: >> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set >> the name of the application in the system menu bar. >> >> Because this set shortly after the VM is running, it causes a thread safety >> issue described in

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v2]

2021-09-28 Thread Phil Race
On Mon, 27 Sep 2021 23:50:38 GMT, Phil Race wrote: >> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set >> the name of the application in the system menu bar. >> >> Because this set shortly after the VM is running, it causes a thread safety >> issue described in

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v3]

2021-09-28 Thread Phil Race
> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set > the name of the application in the system menu bar. > > Because this set shortly after the VM is running, it causes a thread safety > issue described in https://bugs.openjdk.java.net/browse/JDK-8270549 > > Since the AWT

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v2]

2021-09-28 Thread Phil Race
On Wed, 29 Sep 2021 01:46:32 GMT, Sergey Bylokhov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher >> code > >

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v2]

2021-09-28 Thread Sergey Bylokhov
On Mon, 27 Sep 2021 23:50:38 GMT, Phil Race wrote: >> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set >> the name of the application in the system menu bar. >> >> Because this set shortly after the VM is running, it causes a thread safety >> issue described in

Re: RFR: 8273656: Improve java.lang.invoke.MethodType.parameterList() and its usage

2021-09-28 Thread Joseph D. Darcy
On 9/22/2021 4:53 PM, Claes Redestad wrote: On Mon, 13 Sep 2021 11:06:15 GMT, Сергей Цыпанов wrote: Currently the method is implemented like public List> parameterList() { return Collections.unmodifiableList(Arrays.asList(ptypes.clone())); } This seems to be excessive, as three objects

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Claes Redestad
On Tue, 28 Sep 2021 08:25:17 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

Integrated: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

2021-09-28 Thread Joe Darcy
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy wrote: > Follow-up change to JDK-8232230, augmentations to javac's Xlint:serial > checking are out for review (https://github.com/openjdk/jdk/pull/5709) and > java.util.concurrent would need some changes to pass under the expanded > checks. > > The

RFR: 8274464: Remove redundant stream() call before forEach in java.* modules

2021-09-28 Thread Andrey Turbanov
8274464: Remove redundant stream() call before forEach in java.* modules - Commit messages: - [PATCH] Remove redundant stream() call before forEach in java.* modules Changes: https://git.openjdk.java.net/jdk/pull/5520/files Webrev:

Integrated: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml

2021-09-28 Thread Joe Darcy
On Tue, 28 Sep 2021 07:07:37 GMT, Joe Darcy wrote: > Augmentations to javac's Xlint:serial checking are out for review (#5709) and > the java.xml module would need some changes to pass under the expanded checks. > > The changes are to suppress warnings where non-transient fields in >

Re: RFR: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml [v2]

2021-09-28 Thread Joe Darcy
On Tue, 28 Sep 2021 16:42:49 GMT, Joe Wang wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update copyrights. > > src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIAttrNSImpl.java > line 63: >

Re: RFR: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml [v2]

2021-09-28 Thread Joe Darcy
> Augmentations to javac's Xlint:serial checking are out for review (#5709) and > the java.xml module would need some changes to pass under the expanded checks. > > The changes are to suppress warnings where non-transient fields in > serializable types are not declared with a type statically

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-09-28 Thread Weijun Wang
On Tue, 31 Aug 2021 02:05:06 GMT, Weijun Wang wrote: >> This change modifies the default value of the `java.security.manager` system >> property from "allow" to "disallow". This means unless it's explicitly set >> to "allow", any call to `System.setSecurityManager()` would throw an UOE. >> >>

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Mandy Chung
On Tue, 28 Sep 2021 08:25:17 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

Integrated: 8274394: Use Optional.isEmpty instead of !Optional.isPresent in jdk.jlink

2021-09-28 Thread Andrey Turbanov
On Sun, 26 Sep 2021 13:58:35 GMT, Andrey Turbanov wrote: > I propose to replace usages of !Optional.isPresent() with Optional.isEmpty > method. > It's makes code a bit easier to read. > Noticing negation before long chain of method calls is hard. This pull request has now been integrated.

Integrated: 8274276: Cache normalizedBase URL in URLClassPath.FileLoader

2021-09-28 Thread Сергей Цыпанов
On Fri, 24 Sep 2021 10:35:54 GMT, Сергей Цыпанов wrote: > Currently on each invocation of `URLClassPath.FileLoader.getResource()` > `normalizedBase` URL is recalculated using same final `baseURL` from parent > class. This can be avoided giving significant improvement in memory > consumption.

Re: RFR: 8274394: Use Optional.isEmpty instead of !Optional.isPresent in jdk.jlink

2021-09-28 Thread Mandy Chung
On Sun, 26 Sep 2021 13:58:35 GMT, Andrey Turbanov wrote: > I propose to replace usages of !Optional.isPresent() with Optional.isEmpty > method. > It's makes code a bit easier to read. > Noticing negation before long chain of method calls is hard. LGTM - Marked as reviewed by

Re: RFR: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml

2021-09-28 Thread Joe Wang
On Tue, 28 Sep 2021 07:07:37 GMT, Joe Darcy wrote: > Augmentations to javac's Xlint:serial checking are out for review (#5709) and > the java.xml module would need some changes to pass under the expanded checks. > > The changes are to suppress warnings where non-transient fields in >

Re: RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

2021-09-28 Thread Iris Clark
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy wrote: > Follow-up change to JDK-8232230, augmentations to javac's Xlint:serial > checking are out for review (https://github.com/openjdk/jdk/pull/5709) and > java.util.concurrent would need some changes to pass under the expanded > checks. > > The

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v2]

2021-09-28 Thread Doug Simon
On Mon, 27 Sep 2021 23:50:38 GMT, Phil Race wrote: >> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set >> the name of the application in the system menu bar. >> >> Because this set shortly after the VM is running, it causes a thread safety >> issue described in

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Tobias Hartmann
On Tue, 28 Sep 2021 11:49:29 GMT, Claes Redestad wrote: >> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to >> work also for ASCII encoding, which makes for example the `UTF_8$Encoder` >> perform on par with (or outperform) similarly getting charset encoded bytes >>

Re: RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

2021-09-28 Thread Joe Darcy
On Tue, 28 Sep 2021 11:28:42 GMT, Doug Lea wrote: > > > Just to be sure, does this include only the conditionally serializable > annotations in ForkJoinPool and ForkJoinTask in: > https://github.com/openjdk/jdk/pull/5718/files/a20d9afbd7b49b452b3c9bdc9f2d56442b5e2fc6 > If so, this looks OK

Re: RFR: 8274397: [macOS] Stop setting env. var JAVA_MAIN_CLASS_ in launcher code [v2]

2021-09-28 Thread Roger Riggs
On Mon, 27 Sep 2021 23:50:38 GMT, Phil Race wrote: >> macOS launcher code sets JAVA_MAIN_CLASS_ which is read by AWT to set >> the name of the application in the system menu bar. >> >> Because this set shortly after the VM is running, it causes a thread safety >> issue described in

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Claes Redestad
Yes, this was spotted and fixed already. Annoyingly the test I added didn't detect this so GHA was green, but it failed some tier2 tests on aarch64. I added extra safeguards by predicating matching the encode_iso_array instructions on the node being !ascii, which will cause C2 to report an

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Peter Levart
On Tue, 28 Sep 2021 09:50:45 GMT, Claes Redestad wrote: > Does `Reflection::new_method/...` (which are natively implemented > constructors) need any special treatment for them to follow the same > semantics as a Java-based constructor w.r.t. final field writes? Or could > they be rewritten to

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Volker Simonis
On Tue, 28 Sep 2021 10:01:43 GMT, Claes Redestad wrote: >> Not too much work. I recently introduced platform-specific `matcher_*.hpp` >> files, so since then adding a boolean constant is easy (no need to muck with >> the .ad files). > > Does the changes in 9800a99 resolve your concerns? In

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v5]

2021-09-28 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

2021-09-28 Thread Doug Lea
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy wrote: > Follow-up change to JDK-8232230, augmentations to javac's Xlint:serial > checking are out for review (https://github.com/openjdk/jdk/pull/5709) and > java.util.concurrent would need some changes to pass under the expanded > checks. > > The

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v7]

2021-09-28 Thread Bernd Eckenfels
Just a nit, but how about: * For all interfaces use “-b ​​​0.0.0.0“ (IPv4) or “-b ::“ (IPv6) Instead of: * For 0.0.0.0 (all interfaces) use -b 0.0.0.0 or -b ::0 In the usage? (I think „::“ is canon?) Gruss Bernd -- http://bernd.eckenfels.net Von: net-dev

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v7]

2021-09-28 Thread Daniel Fuchs
On Tue, 28 Sep 2021 10:08:29 GMT, Julia Boes wrote: >> This change implements a simple web server that can be run on the >> command-line with `java -m jdk.httpserver`. >> >> This is facilitated by adding an entry point for the `jdk.httpserver` >> module, an implementation class whose main

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v7]

2021-09-28 Thread Julia Boes
On Tue, 28 Sep 2021 10:08:29 GMT, Julia Boes wrote: >> This change implements a simple web server that can be run on the >> command-line with `java -m jdk.httpserver`. >> >> This is facilitated by adding an entry point for the `jdk.httpserver` >> module, an implementation class whose main

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v4]

2021-09-28 Thread Claes Redestad
> This patch extends the `ISO_8859_1.implEncodeISOArray` intrinsic on x86 to > work also for ASCII encoding, which makes for example the `UTF_8$Encoder` > perform on par with (or outperform) similarly getting charset encoded bytes > from a String. The former took a small performance hit in JDK

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v7]

2021-09-28 Thread Julia Boes
> This change implements a simple web server that can be run on the > command-line with `java -m jdk.httpserver`. > > This is facilitated by adding an entry point for the `jdk.httpserver` module, > an implementation class whose main method is run when the above command is > executed. This is

Re: RFR: 8274242: Implement fast-path for ASCII-compatible CharsetEncoders on x86 [v3]

2021-09-28 Thread Claes Redestad
On Mon, 27 Sep 2021 12:11:22 GMT, Claes Redestad wrote: >> src/hotspot/share/opto/c2compiler.cpp line 222: >> >>> 220: #if !defined(X86) >>> 221: return false; // not yet implemented >>> 222: #endif >> >> It might be a little more work, but I think it's cleaner to move the >> decision

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Claes Redestad
On Tue, 28 Sep 2021 08:25:17 GMT, Peter Levart wrote: >> This patch improves reflective access speed as shown by the included >> benchmarks: >> >> https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a >> >> ... and is also a prerequisite to make JEP

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

2021-09-28 Thread Raffaello Giulietti
On Fri, 16 Apr 2021 11:30:32 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: 4511638: Double.toString(double) sometimes produces incorrect results [v2]

2021-09-28 Thread Alan Bateman
On Tue, 28 Sep 2021 08:27:22 GMT, Andrew Haley wrote: > My turn to keep this PR alive. If we'd had any actual face-to-face > contributors' meetings this year I would have raised this stuck PR as an > issue with our processes. I believe that the previous discussion on this topic had an AI to

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

2021-09-28 Thread Andrew Haley
On Fri, 16 Apr 2021 11:30:32 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: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Peter Levart
On Mon, 27 Sep 2021 19:59:00 GMT, Mandy Chung wrote: > A stray thought is why not most fields in `Field`/`Method`/`Constructor` are > `final`, as my IDE suggests. I can't find any hotspot code that injects > values to these fields. Experimentally changing most fields in `Field` to > final

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable [v2]

2021-09-28 Thread Peter Levart
> This patch improves reflective access speed as shown by the included > benchmarks: > > https://jmh.morethan.io/?gists=902f4b43519c4f96c7abcd14cdc2d27d,ac490481e3001c710d75d6071c10b23a > > ... and is also a prerequisite to make JEP 416 (Reimplement Core Reflection > with Method Handle)

Re: RFR: 8274299: Make Method/Constructor/Field accessors @Stable

2021-09-28 Thread Peter Levart
On Mon, 27 Sep 2021 17:31:50 GMT, Mandy Chung wrote: > Looks good to me. Very nice performance improvement. > > One minor comment: I think the change in `UnsafeFieldAccessorImpl.java` and > `UnsafeStaticFieldAccessorImpl.java` isn't necessary since they're final > fields. It can be reverted.

Re: RFR: 8274394: Use Optional.isEmpty instead of !Optional.isPresent in jdk.jlink

2021-09-28 Thread Alan Bateman
On Sun, 26 Sep 2021 13:58:35 GMT, Andrey Turbanov wrote: > I propose to replace usages of !Optional.isPresent() with Optional.isEmpty > method. > It's makes code a bit easier to read. > Noticing negation before long chain of method calls is hard. Looks okay, this code pre-dates the isEmpty

Re: RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

2021-09-28 Thread Alan Bateman
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy wrote: > Follow-up change to JDK-8232230, augmentations to javac's Xlint:serial > checking are out for review (https://github.com/openjdk/jdk/pull/5709) and > java.util.concurrent would need some changes to pass under the expanded > checks. > > The

RFR: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml

2021-09-28 Thread Joe Darcy
Augmentations to javac's Xlint:serial checking are out for review (#5709) and the java.xml module would need some changes to pass under the expanded checks. The changes are to suppress warnings where non-transient fields in serializable types are not declared with a type statically known to be