Integrated: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor

2023-02-24 Thread Alan Bateman
On Mon, 20 Feb 2023 18:34:17 GMT, Alan Bateman wrote: > Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer > in

Integrated: 8302871: Speed up StringLatin1.regionMatchesCI

2023-02-24 Thread Eirik Bjorsnos
On Sat, 18 Feb 2023 09:21:25 GMT, Eirik Bjorsnos wrote: > This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying > 'the oldest ASCII trick in the book'. > > The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two > latin1 bytes for equality ignoring case.

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v4]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 18:09:16 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v4]

2023-02-24 Thread Archie L . Cobbs
On Fri, 24 Feb 2023 22:24:10 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix typo in one comment and clarify another. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.jav

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v5]

2023-02-24 Thread Archie L . Cobbs
> This bug relates to the "potentially ambiguous overload" warning which is > enabled by `-Xlint:overloads`. > > The warning detects certain ambiguities that can cause problems for lambdas. > For example, consider the interface `Spliterator.OfInt`, which declares these > two methods: > > void

Re: RFR: 8143900: OptimizeStringConcat has an opaque dependency on Integer.sizeTable field [v2]

2023-02-24 Thread Vladimir Kozlov
On Fri, 24 Feb 2023 10:19:49 GMT, Yi Yang wrote: >> Hi, can I have a review for this patch? I noticed a strange field >> Integer.sizeTable which is used by PhaseStringOpts, after digging into the >> history, I think it could be replaced by an in-place array allocation and >> initialization. Be

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed. [v2]

2023-02-24 Thread Leonid Mesnik
> The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new OutputAnalyzer(this.process);' > in method xrun() to be able to t

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed. [v2]

2023-02-24 Thread Leonid Mesnik
On Fri, 24 Feb 2023 22:41:34 GMT, Roger Riggs wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> updated to always check if process is alive. > > test/lib/jdk/test/lib/process/ProcessTools.java line 228: > >> 226:

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider [v3]

2023-02-24 Thread Madjosz
> Fixes JDK-8302983 (and duplicate JDK-8302898) Madjosz has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revisi

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v3]

2023-02-24 Thread Brian Burkhalter
On Fri, 24 Feb 2023 18:40:38 GMT, Joe Darcy wrote: >> The wheel of FDLIBM porting turns a notch and sqrt comes into play. >> >> While the sqrt operation usually has a hardware implementation that is >> intrinsified, for completeness a software implementation should be available >> as well. > >

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 22:15:18 GMT, Leonid Mesnik wrote: > The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new OutputAn

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 22:15:18 GMT, Leonid Mesnik wrote: > The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new OutputAn

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v4]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 18:09:16 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8303133: Update ProcessTols.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Daniel D . Daugherty
On Fri, 24 Feb 2023 22:15:18 GMT, Leonid Mesnik wrote: > The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new OutputAn

RFR: 8303133: Update ProcessTols.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Leonid Mesnik
The solution proposed by Stefan K The startProcess() might wait forever for the expected line if the process exits (failed to start). It makes sense to just fail earlier in such cases. The fix also move 'output = new OutputAnalyzer(this.process);' in method xrun() to be able to try to print them

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 21:57:41 GMT, Justin Lu wrote: >> OK but then we should be consistent and update all of the methods to use the >> new tag or revert the change for consistency > > Makes sense, will look at both Locale and LocaleServiceProviderPool and > update the methods that are applicabl

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Justin Lu
On Fri, 24 Feb 2023 18:58:45 GMT, Lance Andersen wrote: >> From what I saw in other methods, `@return ...` goes on the bottom (like the >> line I removed), but the javadoc 16 tag `{@return ... }` goes on the top. > > OK but then we should be consistent and update all of the methods to use the >

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider [v2]

2023-02-24 Thread Naoto Sato
On Fri, 24 Feb 2023 19:52:59 GMT, Madjosz wrote: >> Fixes JDK-8302983 (and duplicate JDK-8302898) > > Madjosz has updated the pull request incrementally with one additional commit > since the last revision: > > apply review comments Changes requested by naoto (Reviewer). test/jdk/java/time/

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 17:45:42 GMT, Raffaello Giulietti wrote: >> addressed > > JMH does not indicate any performance regression. > > W.r.t. renaming Java parameters in `@IntrinsicCandidate` methods, I > crosschecked with a runtime compiler guy. He confirms that changing names in > the Java imp

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 20:05:52 GMT, Archie L. Cobbs wrote: >> I'm not saying that we should de-stream the code, actually we can do that >> later on, in a separate issue, iff there is a performance related complain, >> but it is true that in the past, I have seen some performance issues and the >

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Archie L . Cobbs
On Fri, 24 Feb 2023 19:49:18 GMT, Vicente Romero wrote: >>> I think the code should be split a bit using helper methods >> >> OK - will do. >> >>> I'm a bit worried that overuse of streams in this code could imply some >>> performance hit >> >> I asked basically the same question ([in a separ

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider [v2]

2023-02-24 Thread Madjosz
On Fri, 24 Feb 2023 19:35:29 GMT, Madjosz wrote: >> test/jdk/java/time/test/java/time/zone/TestZoneRulesProvider.java line 123: >> >>> 121: ZoneRulesProvider.registerProvider(provider); >>> 122: assertTrue(ZoneId.getAvailableZoneIds().contains(zone), >>> "Unexpected non-availabi

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider [v2]

2023-02-24 Thread Madjosz
> Fixes JDK-8302983 (and duplicate JDK-8302898) Madjosz has updated the pull request incrementally with one additional commit since the last revision: apply review comments - Changes: - all: https://git.openjdk.org/jdk/pull/12690/files - new: https://git.openjdk.org/jdk/pull/

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 19:27:02 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 2719: >> >>> 2717: * does not override any other methods (in which case site is >>> responsible). >>> 2718: */ >>> 2719: void checkPotentiallyAmbigu

Re: RFR: 8302983: ZoneRulesProvider.registerProvider() twice will remove provider

2023-02-24 Thread Madjosz
On Wed, 22 Feb 2023 20:41:07 GMT, Naoto Sato wrote: >> Fixes JDK-8302983 (and duplicate JDK-8302898) > > test/jdk/java/time/test/java/time/zone/TestZoneRulesProvider.java line 123: > >> 121: ZoneRulesProvider.registerProvider(provider); >> 122: assertTrue(ZoneId.getAvailableZoneI

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Archie L . Cobbs
On Fri, 24 Feb 2023 19:00:51 GMT, Vicente Romero wrote: > I think the code should be split a bit using helper methods OK - will do. > I'm a bit worried that overuse of streams in this code could imply some > performance hit I asked basically the same question ([in a separate thread](https://

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v5]

2023-02-24 Thread Brent Christian
On Fri, 24 Feb 2023 13:44:40 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal [v2]

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 19:04:33 GMT, Brian Burkhalter wrote: >> Deprecate `SensitivityWatchEventModifier` for now instead of directly >> removing it as proposed in #12626. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8

RFR: 8303186: Missing Classpath exception from Continuation.c

2023-02-24 Thread Tyler Steele
This PR adds the Classpath exception to the header file of `src/java.base/share/native/libjava/Continuation.c`. - Commit messages: - Adds classpath exception Changes: https://git.openjdk.org/jdk/pull/12747/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12747&range=00 Iss

Re: RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal [v2]

2023-02-24 Thread Brian Burkhalter
> Deprecate `SensitivityWatchEventModifier` for now instead of directly > removing it as proposed in #12626. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8303175: Move @deprecated above @since; tweak verbiage - C

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 16:04:38 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8143900: OptimizeStringConcat has an opaque dependency on Integer.sizeTable field [v2]

2023-02-24 Thread Vladimir Kozlov
On Fri, 24 Feb 2023 10:19:49 GMT, Yi Yang wrote: >> Hi, can I have a review for this patch? I noticed a strange field >> Integer.sizeTable which is used by PhaseStringOpts, after digging into the >> history, I think it could be replaced by an in-place array allocation and >> initialization. Be

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 18:39:55 GMT, Justin Lu wrote: >> src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderPool.java >> line 155: >> >>> 153: * that are provided by each provider, including the JRE. >>> 154: * >>> 155: * @return a stream of the available loca

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Justin Lu
> This PR adds a new method to java.util.Locale which returns Stream > > The contents of the Stream are composed of the same underlying elements as > Locale.getAvailableLocales(). > > This method allows streaming of the Locale array without creating a defensive > copy. Justin Lu has updated th

Re: RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 18:23:06 GMT, Brian Burkhalter wrote: > Deprecate `SensitivityWatchEventModifier` for now instead of directly > removing it as proposed in #12626. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12746

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v2]

2023-02-24 Thread Justin Lu
On Fri, 24 Feb 2023 18:33:20 GMT, Lance Andersen wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Doc adjustments, fix method name in test > > src/java.base/share/classes/sun/util/locale/provider/LocaleServiceProviderP

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v2]

2023-02-24 Thread Naoto Sato
On Fri, 24 Feb 2023 18:27:30 GMT, Justin Lu wrote: >> This PR adds a new method to java.util.Locale which returns Stream >> >> The contents of the Stream are composed of the same underlying elements as >> Locale.getAvailableLocales(). >> >> This method allows streaming of the Locale array with

Re: RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal

2023-02-24 Thread Brian Burkhalter
On Fri, 24 Feb 2023 18:40:44 GMT, Lance Andersen wrote: > I believe we need a CSR for this @LanceAndersen I concur. - PR: https://git.openjdk.org/jdk/pull/12746

Re: RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 18:23:06 GMT, Brian Burkhalter wrote: > Deprecate `SensitivityWatchEventModifier` for now instead of directly > removing it as proposed in #12626. Hi Brian, I believe we need a CSR for this - PR: https://git.openjdk.org/jdk/pull/12746

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v3]

2023-02-24 Thread Joe Darcy
> The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. Joe Darcy has updated the pull request incrementally with on

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v2]

2023-02-24 Thread Joe Darcy
On Fri, 24 Feb 2023 13:31:10 GMT, Raffaello Giulietti wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > test/jdk/java/lang/StrictMath/ExhaustingTests.java line 71: > >> 69:

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v2]

2023-02-24 Thread Joe Darcy
On Fri, 24 Feb 2023 13:19:36 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/FdLibm.java line 689: >> >>> 687: ix0 += (m << 20); >>> 688: z = __HI(z, ix0); >>> 689: z = __LO(z, ix1); >> >> I was tempted to rewrite these line as somet

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java [v2]

2023-02-24 Thread Joe Darcy
> The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. Joe Darcy has updated the pull request incrementally with on

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v2]

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 18:27:30 GMT, Justin Lu wrote: >> This PR adds a new method to java.util.Locale which returns Stream >> >> The contents of the Stream are composed of the same underlying elements as >> Locale.getAvailableLocales(). >> >> This method allows streaming of the Locale array with

Withdrawn: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier

2023-02-24 Thread Brian Burkhalter
On Sat, 18 Feb 2023 00:11:29 GMT, Brian Burkhalter wrote: > This enum is not used in the JDK and did not appear in external source code > searches. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/12626

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v2]

2023-02-24 Thread Naoto Sato
On Fri, 24 Feb 2023 18:27:30 GMT, Justin Lu wrote: >> This PR adds a new method to java.util.Locale which returns Stream >> >> The contents of the Stream are composed of the same underlying elements as >> Locale.getAvailableLocales(). >> >> This method allows streaming of the Locale array with

RFR: 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal

2023-02-24 Thread Brian Burkhalter
Deprecate `SensitivityWatchEventModifier` for now instead of directly removing it as proposed in #12626. - Commit messages: - 8303175: (fs) Deprecate com.sun.nio.file.SensitivityWatchEventModifier for removal Changes: https://git.openjdk.org/jdk/pull/12746/files Webrev: https://w

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v2]

2023-02-24 Thread Justin Lu
> This PR adds a new method to java.util.Locale which returns Stream > > The contents of the Stream are composed of the same underlying elements as > Locale.getAvailableLocales(). > > This method allows streaming of the Locale array without creating a defensive > copy. Justin Lu has updated th

Re: RFR: 8301119: Support for GB18030-2022 [v4]

2023-02-24 Thread Lance Andersen
On Fri, 24 Feb 2023 17:23:25 GMT, Naoto Sato wrote: >> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since >> this is not a compatible upgrade to the existing mapping, a new system >> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the >> mapping f

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Archie L . Cobbs
On Fri, 24 Feb 2023 18:01:56 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove placeholder flag UNUSED_1; just leave a comment instead. > > src/jdk.compiler/share/classes/com/sun/tools/j

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v4]

2023-02-24 Thread Archie L . Cobbs
> This bug relates to the "potentially ambiguous overload" warning which is > enabled by `-Xlint:overloads`. > > The warning detects certain ambiguities that can cause problems for lambdas. > For example, consider the interface `Spliterator.OfInt`, which declares these > two methods: > > void

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Vicente Romero
On Fri, 24 Feb 2023 16:04:38 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 17:40:52 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 2462: >> >>> 2460: * >>> 2461: * There are no restrictions on the value of {@code fromIndex} >>> and >>> 2462: * {@code toIndex}. Negative values have the same

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 15:38:22 GMT, Roger Riggs wrote: >> I was reluctant to add it, as it is not yet known when the PR will be >> integrated. I'll add it in the next commit. > > When the CSR is approved is a good trigger for adding @since. But its fine > to be optimistic in the PR. addressed

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Raffaello Giulietti
> Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) -

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 17:04:17 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) > > src/java.base/share/classes/java/lang/String.

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v15]

2023-02-24 Thread Mandy Chung
On Fri, 24 Feb 2023 17:12:23 GMT, Ian Graves wrote: >> This is an approach to adding a flag to jlink that will allow --compress to >> take the same types of arguments as jmod, thus bringing the two into >> alignment. This likely requires a CSR and a discussion on whether we should >> deprecate

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-24 Thread Naoto Sato
On Fri, 24 Feb 2023 08:34:48 GMT, Ichiroh Takiguchi wrote: > Hello @naotoj . Sorry for bothering you. > > I have following question: > > * Why GB18030.java.template is in > src/jdk.charsets/share/classes/sun/nio/cs/ext/ directory even if the > generated code is always stored into sun/nio/cs

Re: RFR: 8301119: Support for GB18030-2022 [v4]

2023-02-24 Thread Naoto Sato
> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since > this is not a compatible upgrade to the existing mapping, a new system > property `jdk.charset.GB18030` is introduced. If it is set to "2000", the > mapping falls back to the existing mapping based on the 2000 standa

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v14]

2023-02-24 Thread Ian Graves
On Fri, 24 Feb 2023 03:52:31 GMT, Mandy Chung wrote: >> Ian Graves has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Additional cleanup > > src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties line > 74: > >> 72: >>

Re: RFR: 8293667: Align jlink's --compress option with jmod's --compress option [v15]

2023-02-24 Thread Ian Graves
> This is an approach to adding a flag to jlink that will allow --compress to > take the same types of arguments as jmod, thus bringing the two into > alignment. This likely requires a CSR and a discussion on whether we should > deprecate or simply remove the original numeric compression argumen

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 16:35:25 GMT, Raffaello Giulietti wrote: >> Personally I would expect `string.substring(fromIndex, toIndex).indexOf(ch)` >> to behave isomorphically to `string.indexOf(ch, fromIndex, toIndex)` > > Then you would also expect `string.substring(fromIndex).indexOf(ch)` to > beh

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 16:27:10 GMT, Viktor Klang wrote: >> This is the behavior of the underlying implementation as well. > > Personally I would expect `string.substring(fromIndex, toIndex).indexOf(ch)` > to behave isomorphically to `string.indexOf(ch, fromIndex, toIndex)` Then you would also exp

Re: RFR: 8302806: (fs) Remove com.sun.nio.file.SensitivityWatchEventModifier [v6]

2023-02-24 Thread Brian Burkhalter
> This enum is not used in the JDK and did not appear in external source code > searches. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8302806: s/modifiers != null/modifiers.length > 0/ - Changes: - all: https:

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Viktor Klang
On Fri, 24 Feb 2023 15:32:34 GMT, Raffaello Giulietti wrote: >> I simply extrapolated the behavior from `indexOf(int ch,int fromIndex), >> which has a similar note: >> >> * There is no restriction on the value of {@code fromIndex}. If it >> * is negative, it has the same effect as if

Re: RFR: 8292914: Drop the counter from lambda class names [v10]

2023-02-24 Thread Mandy Chung
On Fri, 24 Feb 2023 16:12:29 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8292914: Drop the counter from lambda class names [v10]

2023-02-24 Thread David M . Lloyd
> The class generated for lambda proxies is now defined as a hidden class. This > means that the counter, which was used to ensure a unique class name and > avoid clashes, is now redundant. In addition to performing redundant work, > this also impacts build reproducibility for native image gener

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing [v2]

2023-02-24 Thread Viktor Klang
> Clarifies the distinction between expiration of the head of DelayQueue and > how it relates to `poll`, `take`, and `peek`. See discussion on > https://bugs.openjdk.org/browse/JDK-8297605 > > @DougLea If possible, please weigh in on whether this is in line with your > thoughts on the matter.

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v2]

2023-02-24 Thread Archie L . Cobbs
On Fri, 24 Feb 2023 11:49:55 GMT, Vicente Romero wrote: > I think a CSR is needed as we will be generating more warnings and projects > compiling with -Werror could see compilation errors Will do - thanks. > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java line 280: > >> 278

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v3]

2023-02-24 Thread Archie L . Cobbs
> This bug relates to the "potentially ambiguous overload" warning which is > enabled by `-Xlint:overloads`. > > The warning detects certain ambiguities that can cause problems for lambdas. > For example, consider the interface `Spliterator.OfInt`, which declares these > two methods: > > void

Re: RFR: 8292914: Drop the counter from lambda class names [v9]

2023-02-24 Thread Mandy Chung
On Fri, 24 Feb 2023 14:19:40 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Integrated: JDK-8303072: Memory leak in exeNullCallerTest.cpp

2023-02-24 Thread Justin King
On Wed, 22 Feb 2023 14:02:28 GMT, Justin King wrote: > Fix trivial memory leak that occurs during tests. This pull request has now been integrated. Changeset: 83d77b1c Author:Justin King URL: https://git.openjdk.org/jdk/commit/83d77b1cbb6d0179e9c130d51b7fada2e76e86d3 Stats: 3 li

Re: RFR: JDK-8303072: Memory leak in exeNullCallerTest.cpp

2023-02-24 Thread Justin King
On Wed, 22 Feb 2023 14:02:28 GMT, Justin King wrote: > Fix trivial memory leak that occurs during tests. Failing test is unrelated and from an already fix at head issue. - PR: https://git.openjdk.org/jdk/pull/12715

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v5]

2023-02-24 Thread Martin Buchholz
On Fri, 24 Feb 2023 13:44:40 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty finalize

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 15:28:33 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 2483: >> >>> 2481: return isLatin1() ? StringLatin1.indexOf(value, ch, >>> fromIndex, toIndex) >>> 2482: : StringUTF16.indexOf(value, ch, fromIndex, to

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 15:26:35 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 2467: >> >>> 2465: * >>> 2466: * As consequence of these rules, if {@code fromIndex} is >>> greater than >>> 2467: * or equal to {@code toIndex}, then {@code -1

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Raffaello Giulietti
On Fri, 24 Feb 2023 14:54:50 GMT, Alan Bateman wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > src/java.base/share/classes/java/lang/String.java line 2467: > >> 2465: * >> 2466: * As consequence of these rules, if {@code f

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Alan Bateman
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. src/java.base/share/classes/java/lang/String.java line 2467: > 2465: * > 2466: * As consequence of these rules, if {@code fr

Re: RFR: 8302871: Speed up StringLatin1.regionMatchesCI [v14]

2023-02-24 Thread Alan Bateman
On Wed, 22 Feb 2023 20:01:52 GMT, Eirik Bjorsnos wrote: >> This PR suggests we can speed up `StringLatin1.regionMatchesCI` by applying >> 'the oldest ASCII trick in the book'. >> >> The new static method `CharacterDataLatin1.equalsIgnoreCase` compares two >> latin1 bytes for equality ignoring

Re: RFR: 8292914: Drop the counter from lambda class names [v8]

2023-02-24 Thread David M . Lloyd
On Thu, 23 Feb 2023 23:50:16 GMT, Mandy Chung wrote: >> David M. Lloyd has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Many tests have patterns for lambda class names; update them >> - Update comments and javadoc showin the old patter

Re: RFR: 8292914: Drop the counter from lambda class names [v9]

2023-02-24 Thread David M . Lloyd
> The class generated for lambda proxies is now defined as a hidden class. This > means that the counter, which was used to ensure a unique class name and > avoid clashes, is now redundant. In addition to performing redundant work, > this also impacts build reproducibility for native image gener

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-24 Thread Alan Bateman
On Thu, 23 Feb 2023 16:36:46 GMT, Martin Buchholz wrote: >> Alan Bateman 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 >> com

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v5]

2023-02-24 Thread Alan Bateman
> Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer > in java.base. Removing it will likely lead to bug reports/

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-24 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 23:39:26 GMT, Joe Darcy wrote: >> The wheel of FDLIBM porting turns a notch and sqrt comes into play. >> >> While the sqrt operation usually has a hardware implementation that is >> intrinsified, for completeness a software implementation should be available >> as well. > >

Re: RFR: JDK-8302040: Port fdlibm sqrt to Java

2023-02-24 Thread Raffaello Giulietti
On Thu, 23 Feb 2023 23:28:11 GMT, Joe Darcy wrote: > The wheel of FDLIBM porting turns a notch and sqrt comes into play. > > While the sqrt operation usually has a hardware implementation that is > intrinsified, for completeness a software implementation should be available > as well. Otherwi

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v2]

2023-02-24 Thread Vicente Romero
On Tue, 21 Feb 2023 01:42:41 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-24 Thread Alan Bateman
On Fri, 24 Feb 2023 08:34:48 GMT, Ichiroh Takiguchi wrote: > * Why GB18030.java.template is in > src/jdk.charsets/share/classes/sun/nio/cs/ext/ directory even if the > generated code is always stored into sun/nio/cs ? That is a good question. It could move, and $PACKAGE replaced with sun.nio.

Re: RFR: 8026369: javac potentially ambiguous overload warning needs an improved scheme [v2]

2023-02-24 Thread Vicente Romero
On Tue, 21 Feb 2023 01:42:41 GMT, Archie L. Cobbs wrote: >> This bug relates to the "potentially ambiguous overload" warning which is >> enabled by `-Xlint:overloads`. >> >> The warning detects certain ambiguities that can cause problems for lambdas. >> For example, consider the interface `Spl

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-24 Thread Sean Coffey
On Thu, 23 Feb 2023 19:34:44 GMT, Naoto Sato wrote: >> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since >> this is not a compatible upgrade to the existing mapping, a new system >> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the >> mapping f

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-24 Thread Robbin Ehn
On Fri, 24 Feb 2023 10:12:52 GMT, Martin Doerr wrote: > > > ~I don't think we've done that much testing with UseSystemMemoryBarrier > > > since it was added~. I'm a bit nervous about turning it on by default > > > since it's currently also used for JNI. Let's see what Robbin thinks. > > > > >

Re: RFR: 8143900: OptimizeStringConcat has an opaque dependency on Integer.sizeTable field

2023-02-24 Thread Yi Yang
On Tue, 21 Feb 2023 02:29:44 GMT, Yi Yang wrote: > Hi, can I have a review for this patch? I noticed a strange field > Integer.sizeTable which is used by PhaseStringOpts, after digging into the > history, I think it could be replaced by an in-place array allocation and > initialization. Before

Re: RFR: 8143900: OptimizeStringConcat has an opaque dependency on Integer.sizeTable field [v2]

2023-02-24 Thread Yi Yang
> Hi, can I have a review for this patch? I noticed a strange field > Integer.sizeTable which is used by PhaseStringOpts, after digging into the > history, I think it could be replaced by an in-place array allocation and > initialization. Before it, we are fetching from Integer.sizeTable and get

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v3]

2023-02-24 Thread Martin Doerr
On Fri, 24 Feb 2023 07:39:15 GMT, Robbin Ehn wrote: > > ~I don't think we've done that much testing with UseSystemMemoryBarrier > > since it was added~. I'm a bit nervous about turning it on by default since > > it's currently also used for JNI. Let's see what Robbin thinks. > > For reliabilit

Re: RFD: Invalid CRC in ZipFile, ZipFileSystem

2023-02-24 Thread Eirik Bjørsnøs
> > Indeed, but I found it a bit amusing that ZipFile (and ZipFileSystem), > which both see the "full picture", are actually the ones to not enforce the > CRC. > With the current state of affairs, it is conceivable that a single-event upset could cause an IF_ICMPNE byte code to be flipped into an

Re: RFD: Invalid CRC in ZipFile, ZipFileSystem

2023-02-24 Thread Eirik Bjørsnøs
On Fri, Feb 24, 2023 at 9:22 AM Alan Bateman wrote: > As a general point, the ZIP format can have redundant metadata and there > can be cases where the CRC-32 isn't available when writing a LOC header. > ZipInputStream throws exceptions in both of these cases. If the general purpose bit flag 3 i

Re: RFR: 8301119: Support for GB18030-2022 [v3]

2023-02-24 Thread Ichiroh Takiguchi
On Thu, 23 Feb 2023 19:34:44 GMT, Naoto Sato wrote: >> Upgrading the GB18030 charset in the JDK to the latest 2022 standard. Since >> this is not a compatible upgrade to the existing mapping, a new system >> property `jdk.charset.GB18030` is introduced. If it is set to "2000", the >> mapping f

Re: RFD: Invalid CRC in ZipFile, ZipFileSystem

2023-02-24 Thread Alan Bateman
On 23/02/2023 16:32, Lance Andersen wrote: HI Eirik On Feb 23, 2023, at 7:43 AM, Eirik Bjørsnøs wrote: Hi, While writing various ZIP related tests, I noticed a discrepancy in the treatment of invalid CRC values: While ZipInputStream rejects invalid CRC values when consuming streams, ZipF