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

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

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v2]

2023-02-27 Thread Tagir F . Valeev
On Mon, 27 Feb 2023 13:20:48 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1903: >> >>> 1901: int total = count * length; >>> 1902: int limit = offset + total; >>> 1903: ensureCapacityInternal(limit); >> >> If I understan

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v3]

2023-02-27 Thread Tagir F . Valeev
On Mon, 27 Feb 2023 13:30:47 GMT, Jim Laskey wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Optimize for empty Char

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

2023-02-27 Thread Tobias Hartmann
On Mon, 27 Feb 2023 18:26:51 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. > >

Integrated: 8026369: javac potentially ambiguous overload warning needs an improved scheme

2023-02-27 Thread Archie L . Cobbs
On Sun, 19 Feb 2023 23:52:52 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 `Splitera

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

2023-02-27 Thread Martin Doerr
On Mon, 27 Feb 2023 08:49:18 GMT, Erik Österlund wrote: > I don’t think we want this to be on by default on platforms where StoreLoad > fences don't cause substantial global overheads. The benefit on such > platforms is rather low, and needing the last couple of nanoseconds of > transition spe

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

2023-02-27 Thread Leonid Mesnik
On Tue, 28 Feb 2023 02:42:33 GMT, David Holmes wrote: >> Leonid Mesnik has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - latch != updated >> - message improved > > This seems okay to me now. Thanks. @dholmes-ora, Thank you for your com

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 23:20:07 GMT, Roger Riggs wrote: >> I can't tell if the thread identity will be included in the log the message? >> >> I'm not so sure it is useful to allow competing exit calls to all log their >> intent. I would have kept the logging itself inside the locked region as per

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

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 23:11:27 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 O

Re: RFR: 8303232: java.util.Date.parse(String) and java.util.Date(String) don't declare thrown IllegalArgumentException

2023-02-27 Thread Jaikiran Pai
On Tue, 28 Feb 2023 00:07:05 GMT, Justin Lu wrote: > The method `java.util.Date.parse(String)` and as a result, constructor > `java.util.Date(String)` throw an `IllegalArgumentException`. This exception > is not properly referenced in the javadoc, and this PR simply adds the throws > javadoc t

RFR: 8303232: java.util.Date.parse(String) and java.util.Date(String) don't declare thrown IllegalArgumentException

2023-02-27 Thread Justin Lu
The method `java.util.Date.parse(String)` and as a result, constructor `java.util.Date(String)` throw an `IllegalArgumentException`. This exception is not properly referenced in the javadoc, and this PR simply adds the throws javadoc tag to make it apparent. - Commit messages: - A

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 23:00:45 GMT, David Holmes wrote: >> Yes, its racy, and intentional, but from a diagnostic view, the developer >> should know that multiple callers were trying to exit. All but one will >> hang. >> Consolidating the code in a single method is cleaner and with fewer >> int

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

2023-02-27 Thread Leonid Mesnik
On Mon, 27 Feb 2023 22:48:46 GMT, David Holmes wrote: >> Leonid Mesnik has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added some extra time to dead process. > > test/lib/jdk/test/lib/process/ProcessTools.java line 227: > >> 225:

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

2023-02-27 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: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 16:05:44 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/Shutdown.java line 189: >> >>> 187: } catch (Throwable throwable2) { >>> 188: // Ignore >>> 189: } >> >> The update means that several threads racing to exit may

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 11:33:38 GMT, Andrey Turbanov wrote: > `LinkedList` is used as a field > `jdk.tools.jimage.JImageTask.OptionsValues#jimages` > It's created, filled (with `add`) and then iterated. No removes from the head > or something like this. `ArrayList` should be preferred as more effi

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

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 22:12:22 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 O

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

2023-02-27 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: 8298619: java/io/File/GetXSpace.java is failing [v3]

2023-02-27 Thread Brian Burkhalter
> Modify the `Space` instances used for size comparison to be created with > total number of bytes derived from the Windows `diskFree` utility instead of > Cygwin’s `df`. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excl

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

2023-02-27 Thread David Holmes
On Mon, 27 Feb 2023 17:55:40 GMT, Leonid Mesnik wrote: >> test/lib/jdk/test/lib/process/ProcessTools.java line 224: >> >>> 222: if (!p.isAlive()) { >>> 223: latch.countDown(); >>> 224: throw new RuntimeException("Started process

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-27 Thread Jim Laskey
On Mon, 27 Feb 2023 11:33:38 GMT, Andrey Turbanov wrote: > `LinkedList` is used as a field > `jdk.tools.jimage.JImageTask.OptionsValues#jimages` > It's created, filled (with `add`) and then iterated. No removes from the head > or something like this. `ArrayList` should be preferred as more effi

Integrated: 8293667: Align jlink's --compress option with jmod's --compress option

2023-02-27 Thread Ian Graves
On Fri, 9 Dec 2022 21:42:15 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 or s

RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-27 Thread Andrey Turbanov
`LinkedList` is used as a field `jdk.tools.jimage.JImageTask.OptionsValues#jimages` It's created, filled (with `add`) and then iterated. No removes from the head or something like this. `ArrayList` should be preferred as more efficient and widely used (more chances for JIT) collection.

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-27 Thread Martin Buchholz
On Thu, 23 Feb 2023 21:20:27 GMT, Martin Buchholz wrote: >> 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 o

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

2023-02-27 Thread Vladimir Kozlov
On Mon, 27 Feb 2023 02:04:13 GMT, Yi Yang wrote: > > Testing results seem good. Except one strange failure I put in > > [JDK-8143900](https://bugs.openjdk.org/browse/JDK-8143900) comment. You > > need second review. > > This seems related to https://bugs.openjdk.org/browse/JDK-8296914 [JDK-82

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

2023-02-27 Thread Vladimir Kozlov
On Mon, 27 Feb 2023 02:16:21 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: JDK-8302040: Port fdlibm sqrt to Java [v5]

2023-02-27 Thread Joe Darcy
On Mon, 27 Feb 2023 18:26:51 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 [v5]

2023-02-27 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 with a new target bas

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

2023-02-27 Thread Raffaello Giulietti
On Mon, 27 Feb 2023 15:05:05 GMT, Alan Bateman wrote: >> @AlanBateman Both from an `@apiNote` and from an implementation perspective, >> the checked _some-prefix_`IndexOf()`variants would better make use of the >> public 3 params `indexOf()` API point proposed here, rather than relying on >> `

Integrated: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 15:50:02 GMT, Roger Riggs wrote: > To simplify future work changing some java.time value based classes to > Valhalla value classes, the explicit calls to super() are removed from > Duration, Instant, and ZoneOffset. This pull request has now been integrated. Changeset: 4c1

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

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 17:37:48 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: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed. [v2]

2023-02-27 Thread Leonid Mesnik
On Mon, 27 Feb 2023 04:54:57 GMT, David Holmes 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 220: > >> 218:

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

2023-02-27 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: 8282319: java.util.Locale method to stream available Locales [v4]

2023-02-27 Thread Lance Andersen
On Mon, 27 Feb 2023 17:32:47 GMT, Justin Lu wrote: > Hi Lance and Roger, I have switched the tag {@return to @return for > consistency. And like you proposed Roger, I will open a separate issue to > address converting the tags. Thank you Justin - PR: https://git.openjdk.org/jdk/p

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

2023-02-27 Thread Lance Andersen
On Mon, 27 Feb 2023 17:37:48 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: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Mandy Chung
On Mon, 27 Feb 2023 15:50:02 GMT, Roger Riggs wrote: > To simplify future work changing some java.time value based classes to > Valhalla value classes, the explicit calls to super() are removed from > Duration, Instant, and ZoneOffset. Marked as reviewed by mchung (Reviewer). - P

Re: RFR: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Lance Andersen
On Mon, 27 Feb 2023 15:50:02 GMT, Roger Riggs wrote: > To simplify future work changing some java.time value based classes to > Valhalla value classes, the explicit calls to super() are removed from > Duration, Instant, and ZoneOffset. Marked as reviewed by lancea (Reviewer). - P

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

2023-02-27 Thread Justin Lu
On Fri, 24 Feb 2023 22:10:11 GMT, Roger Riggs wrote: >> Makes sense, will look at both Locale and LocaleServiceProviderPool and >> update the methods that are applicable for {@return ..}. Thanks Lance > > That's getting a bit far afield of the original issue; a separate issue might > be a bette

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

2023-02-27 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: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Naoto Sato
On Mon, 27 Feb 2023 15:50:02 GMT, Roger Riggs wrote: > To simplify future work changing some java.time value based classes to > Valhalla value classes, the explicit calls to super() are removed from > Duration, Instant, and ZoneOffset. LGTM - Marked as reviewed by naoto (Reviewer

Made random generation of BigIntegers faster

2023-02-27 Thread Fabio Romano
This enhancement makes the generation of random BigIntegers faster, using directly a random generated int[] magnitude array instead of a byte[] array. This permits to call trustedStripLeadingZeroInts() instead of stripLeadingZeroBytes(), in order to avoid copying the contents of the byte[] array in

Integrated: 8292914: Lambda proxies have unstable names

2023-02-27 Thread David M . Lloyd
On Wed, 15 Feb 2023 17:32:38 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, > this

Integrated: 8301119: Support for GB18030-2022

2023-02-27 Thread Naoto Sato
On Fri, 10 Feb 2023 20:35:58 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 falls

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 15:58:33 GMT, Alan Bateman wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > src/java.base/share/classes/java/lang/Shutdown.java line 189: > >

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Alan Bateman
On Mon, 27 Feb 2023 15:41:01 GMT, Roger Riggs wrote: > Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. src/java.base/share/classes/java/lang/Shutdown.java line 189: > 187:

RFR: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Roger Riggs
To simplify future work changing some java.time value based classes to Valhalla value classes, the explicit calls to super() are removed from Duration, Instant, and ZoneOffset. - Commit messages: - 8303253: Remove unnecessary calls to super() in java.time value based classes Chang

RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
Consolidate logging and handle exceptions by printing to standard error and ignoring the exception. Exceptions while logging will not interfere with Runtime.exit. - Commit messages: - Consolidate logging and handle exceptions by printing to standard error Changes: https://git.openj

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

2023-02-27 Thread Alan Bateman
On Mon, 27 Feb 2023 13:38:59 GMT, Raffaello Giulietti wrote: >> Parking this PR while exploration is done into other options is okay. > > @AlanBateman Both from an `@apiNote` and from an implementation perspective, > the checked _some-prefix_`IndexOf()`variants would better make use of the > p

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

2023-02-27 Thread Roger Riggs
On Fri, 24 Feb 2023 16:16:51 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: JDK-8297605 DelayQueue javadoc is confusing

2023-02-27 Thread Viktor Klang
On Thu, 23 Feb 2023 21:20:27 GMT, Martin Buchholz wrote: >> 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 o

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

2023-02-27 Thread David M . Lloyd
On Fri, 24 Feb 2023 16:16:51 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: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-27 Thread Matthew Donovan
On Tue, 21 Feb 2023 18:59:35 GMT, Stuart Marks wrote: >> I don't think all of those code paths ever executed. If `System.exit()` is >> called, regardless of the exit code, `make` treats it as an error: >> >> `TEST RESULT: Failed. Unexpected exit from test [exit code: 0]` >> >> I added a try/ca

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v4]

2023-02-27 Thread Matthew Donovan
On Tue, 21 Feb 2023 19:06:02 GMT, Stuart Marks wrote: >> Matthew Donovan 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 six additional >> commi

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v5]

2023-02-27 Thread Matthew Donovan
> Removed SSLSocketParametersTest.sh script (which just called a Java file) and > configured the java code to run directly with jtreg Matthew Donovan has updated the pull request incrementally with one additional commit since the last revision: cleaned up exception handling - Ch

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

2023-02-27 Thread Doug Lea
On Fri, 24 Feb 2023 16:08:57 GMT, Viktor Klang wrote: >> 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 w

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

2023-02-27 Thread Raffaello Giulietti
On Mon, 27 Feb 2023 12:40:34 GMT, Alan Bateman wrote: >> @AlanBateman I can propose variants of forward-searching >> _some-prefix_`IndexOf()` which are consistent with `substring()` in their >> handling of the indices, but I'd then rather prefer to file another JBS >> issue and prepare another

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Thu, 16 Feb 2023 11:29:51 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/classfile/components/CodeStackTracker.java >> line 43: >> >>> 41: >>> 42: /** >>> 43: * CodeStackTracker is a {@link jdk.internal.classfile.CodeTransform} >>> synchronously tracking >>

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Thu, 16 Feb 2023 11:21:29 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/components/Cod

Re: RFR: 8294982: Implementation of Classfile API [v27]

2023-02-27 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v3]

2023-02-27 Thread Jim Laskey
> Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Optimize for empty CharSequence - Changes: - all: https://git.openjdk.or

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v2]

2023-02-27 Thread Jim Laskey
On Sun, 26 Feb 2023 17:28:08 GMT, Tagir F. Valeev wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PR Cleanup > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1903: > >> 1901: int tot

Re: RFR: 8294982: Implementation of Classfile API [v26]

2023-02-27 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Mon, 27 Feb 2023 11:54:53 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/components/ClassRemapper.java >> line 168: >> >>> 166: public void accept(ClassBuilder clb, ClassElement cle) { >>> 167: switch (cle) { >>> 168: case Fi

Re: RFR: 8294982: Implementation of Classfile API [v25]

2023-02-27 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v2]

2023-02-27 Thread Jim Laskey
On Sun, 26 Feb 2023 17:29:09 GMT, Tagir F. Valeev wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> PR Cleanup > > src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1893: > >> 1891: } >> 18

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v42]

2023-02-27 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

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

2023-02-27 Thread Alan Bateman
On Mon, 27 Feb 2023 12:25:54 GMT, Raffaello Giulietti wrote: >> Consistency with the indexOf/lastIndexOf methods is good, it makes it look >> like the method has been there since JDK 1.0. At the same time, it could >> mean that bugs go undetected, e.g. it would be easy to assume the range is

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

2023-02-27 Thread Raffaello Giulietti
On Mon, 27 Feb 2023 11:02:34 GMT, Alan Bateman wrote: >> @viktorklang-ora I agree that the behavior w.r.t. out-of-range indices is at >> odd with the `substring()` family, but this inconsistency is already present >> since the dawn of time ;-) > > Consistency with the indexOf/lastIndexOf method

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Thu, 16 Feb 2023 11:09:30 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/components/Cla

Re: RFR: 8294982: Implementation of Classfile API [v24]

2023-02-27 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >

Re: RFR: JDK-8297605 DelayQueue javadoc is confusing

2023-02-27 Thread Viktor Klang
On Thu, 23 Feb 2023 21:20:27 GMT, Martin Buchholz wrote: > Here's my attempt: > > ``` > * An unbounded {@linkplain BlockingQueue blocking queue} of {@link Delayed} > * elements, in which an element generally becomes eligible for removal when > its > * delay has expired. > * > * An element

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

2023-02-27 Thread Vicente Romero
On Sat, 25 Feb 2023 16:07:24 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 [v5]

2023-02-27 Thread Vicente Romero
On Sat, 25 Feb 2023 16:03:39 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 2765: >> >>> 2763: * any other methods; in this case the class is definitely >>> responsible. >>> 2764: */ >>> 2765: BiPredicate >>> buildResponsib

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

2023-02-27 Thread Alan Bateman
On Mon, 27 Feb 2023 09:37:57 GMT, Raffaello Giulietti wrote: >> @rgiulietti That's surprising, but if it is as you say, then the indexOf >> with or without the endIndex should behave identically and not throw. > > @viktorklang-ora I agree that the behavior w.r.t. out-of-range indices is at > o

Re: RFR: 8302987: Add uniform and spatially equidistributed bounded float/double streams to RandomGenerator [v3]

2023-02-27 Thread Raffaello Giulietti
> The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range [`origin`, `bound`). It does so by applying the affine transform > `o

Re: RFR: 8302987: Add uniform and spatially equidistributed bounded float/double streams to RandomGenerator [v2]

2023-02-27 Thread Raffaello Giulietti
> The `default` method `nextDouble(double origin, double bound)` in > `java.util.random.RandomGenerator` aims at generating a uniformly and > spatially equidistributed random `double` in the left-closed and right-open > range [`origin`, `bound`). It does so by applying the affine transform > `o

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Thu, 16 Feb 2023 10:54:00 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/components/Cla

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Thu, 16 Feb 2023 10:51:10 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> added 4-byte Unicode text to Utf8EntryTest > > src/java.base/share/classes/jdk/internal/classfile/components/Cla

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

2023-02-27 Thread Raffaello Giulietti
On Mon, 27 Feb 2023 08:00:32 GMT, Viktor Klang wrote: >> (I guess you are referring to the fact that `substring()` can throw.) > > @rgiulietti That's surprising, but if it is as you say, then the indexOf with > or without the endIndex should behave identically and not throw. @viktorklang-ora I

Re: RFR: 8294982: Implementation of Classfile API [v20]

2023-02-27 Thread Adam Sotona
On Fri, 17 Feb 2023 17:09:51 GMT, Maurizio Cimadamore wrote: >> Yes, the print structure does not exactly correspond to the Classfile API >> architecture, but rather to the classfile physical structure and it is >> partly similar to `javap` output. >> The common tree structure has been reverse

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v4]

2023-02-27 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request with a new

Re: RFR: 8299807: newStringNoRepl should avoid copying arrays for ASCII compatible charsets [v4]

2023-02-27 Thread Glavo
On Sat, 28 Jan 2023 19:54:32 GMT, Glavo wrote: >> This is the javadoc of `JavaLangAccess::newStringNoRepl`: >> >> >> /** >> * Constructs a new {@code String} by decoding the specified subarray of >> * bytes using the specified {@linkplain java.nio.charset.Charset >> charset}. >>

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

2023-02-27 Thread Erik Österlund
On Thu, 23 Feb 2023 06:18:49 GMT, Martin Doerr wrote: >> Implementation of "Foreign Function & Memory API" for linux on Power (Little >> Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". >> >> This PR does not include code for VaList support because it's supposed to >>

RFR: 8303227: JniObjWithEnv should be NullablePointer compliant

2023-02-27 Thread Julian Waters
JniObjWithEnv is a struct that is commonly managed by std::unique_ptr. Although it can support managing objects that are not raw pointers, any such objects have to be [NullablePointers](https://en.cppreference.com/w/cpp/named_req/NullablePointer). In the past this has [broken the build when com

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

2023-02-27 Thread Viktor Klang
On Fri, 24 Feb 2023 16:37:58 GMT, Raffaello Giulietti wrote: >> Then you would also expect `string.substring(fromIndex).indexOf(ch)` to >> behave isomorphically to `string.indexOf(ch, fromIndex)` in current >> releases, right? >> It does not. > > (I guess you are referring to the fact that `su