Re: RFR: 8300979: Lazily initialize (byte, char)arr in java.io.DataInputStream [v3]

2023-03-29 Thread Per Minborg
On Tue, 28 Mar 2023 18:15:57 GMT, Eirik Bjorsnos wrote: > > @eirbjo I've updated the PR so we hold zero-length arrays rather than null > > arrays. Please re-run your benchmark to see if there is any change. > > @minborg I ran the test now after your integration and I no longer observe > the re

Re: RFR: 8304919: Implementation of Virtual Threads [v3]

2023-03-29 Thread Alan Bateman
> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The > APIs that were preview APIs in Java 19/20 are changed to permanent and their > `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The > JNI and JVMTI versions are bumped as this is the first chan

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-29 Thread Alan Bateman
On Tue, 28 Mar 2023 21:36:04 GMT, Leonid Mesnik 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 four additional >> commit

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-29 Thread Alan Bateman
On Tue, 28 Mar 2023 19:57:12 GMT, Paul Sandoz 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 four additional >> commits

Re: RFR: 8304919: Implementation of Virtual Threads [v3]

2023-03-29 Thread Andrey Turbanov
On Wed, 29 Mar 2023 07:31:40 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The >>

Re: RFR: 8304919: Implementation of Virtual Threads [v4]

2023-03-29 Thread Alan Bateman
> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The > APIs that were preview APIs in Java 19/20 are changed to permanent and their > `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The > JNI and JVMTI versions are bumped as this is the first chan

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v4]

2023-03-29 Thread Andrey Turbanov
On Wed, 29 Mar 2023 02:10:10 GMT, Mandy Chung wrote: >> This implements a shared utility to dump generated classes defined as >> normal/hidden classes via `Lookup` API. This replaces the implementation >> in `LambdaMetaFactory` and method handle implementation that dumps the >> hidden class

Re: RFR: 8304919: Implementation of Virtual Threads [v3]

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 07:29:06 GMT, Andrey Turbanov wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Test updates > > test/hotspot/jtreg/serviceability/jvmti/vthread/premain/AgentWithVThreadTest.java > line 40: > >>

Re: RFR: 8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree() [v2]

2023-03-29 Thread Sergey Tsypanov
On Tue, 28 Mar 2023 16:40:17 GMT, Naoto Sato wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8304745: Fix package > > test/micro/org/openjdk/bench/java/time/format/ZonedDateTimeFormatterBenchmark.java > line 23

Re: RFR: 8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree() [v2]

2023-03-29 Thread Sergey Tsypanov
> 1) When `DateTimeFormatter` is reused we don't need to copy > `availableZoneIds` and allocate `nonRegionIds` as PrefixTree can be taken > from cache. In the related benchmark allocation of `HashSet` takes ~93% of > all time, so avoiding it should bring some improvement for cases when we > reu

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v13]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Per Minborg
Non-instantiable utility classes should be declared `final` and have a private constructors. See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item 22). - Commit messages: - Make java.util.Arrays final Changes: https://git.openjdk.org/jdk/pull/13221/files

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v14]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). Look fine, it can't be subclassed anyway so there is

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Per Minborg
> API changes for the FFM API (third preview) > > Specdiff: > https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html > > Javadoc: > https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.html Per Minborg has updated the pull request incrementally wit

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Per Minborg
On Wed, 29 Mar 2023 08:24:38 GMT, Alan Bateman wrote: > Look fine, it can't be subclassed anyway so there is no compatibility impact. I thought the change would trigger a change in the public API as the modifiers are changed for the class. This would likely be picked up by compatibility checks

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 08:59:50 GMT, Per Minborg wrote: > I thought the change would trigger a change in the public API as the > modifiers are changed for the class. This would likely be picked up by > compatibility checks and so, a CSR would be needed? It's not a compatibility issue but a CSR is

Re: RFR: 8205129: Remove java.lang.Compiler

2023-03-29 Thread Eirik Bjorsnos
On Sun, 19 Mar 2023 09:01:26 GMT, Eirik Bjorsnos wrote: > Please help review this PR which suggests we remove the class > `java.lang.Compiler`. The class seems non-functional for a decade, and was > terminally deprecated in Java 9. Time has come to let it go. The CSR for this PR has now been a

RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG

2023-03-29 Thread Eirik Bjorsnos
CorruptedZipFiles could benefit from some spring cleaning and a conversion to testNG: - The actual tests are moved into their own `@Test` methods, given more meaningful names and a Javadoc comment explaining the constraint being verified - The setup code is moved to a `@Before` method, slightly

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG

2023-03-29 Thread Lance Andersen
On Tue, 14 Feb 2023 17:46:21 GMT, Eirik Bjorsnos wrote: > CorruptedZipFiles could benefit from some spring cleaning and a conversion to > testNG: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG

2023-03-29 Thread Eirik Bjorsnos
On Mon, 27 Feb 2023 20:47:42 GMT, Lance Andersen wrote: >> CorruptedZipFiles could benefit from some spring cleaning and a conversion >> to testNG: >> >> - The actual tests are moved into their own `@Test` methods, given more >> meaningful names and a Javadoc comment explaining the constraint

RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the number of compressed or uncompressed bytes read from the inflater is larger than the Zip64 magic value. While the ZIP format mandates that the data descriptor `SHOULD be stored in ZIP64 format (as 8 byte values) when a fil

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
On Tue, 28 Feb 2023 20:48:47 GMT, Eirik Bjorsnos wrote: > > Thanks a lot for looking into this, Lance! > > > Are you aware of any tools that would create this scenario as to the best > > > of my knowledge we have not encountered one that does as of yet? > > > > > > The following on my Mac prod

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
On Sun, 12 Feb 2023 15:41:55 GMT, Eirik Bjorsnos wrote: > ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descrip

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
On Mon, 20 Feb 2023 11:28:29 GMT, Lance Andersen wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data de

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
On Tue, 28 Feb 2023 20:31:43 GMT, Eirik Bjorsnos wrote: > Thanks a lot for looking into this, Lance! > > > Are you aware of any tools that would create this scenario as to the best > > of my knowledge we have not encountered one that does as of yet? > > The following on my Mac produces a Zip64

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG

2023-03-29 Thread Eirik Bjorsnos
On Tue, 14 Feb 2023 17:46:21 GMT, Eirik Bjorsnos wrote: > CorruptedZipFiles could benefit from some spring cleaning and a conversion to > testNG: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Eirik Bjorsnos
On Sun, 12 Feb 2023 17:04:51 GMT, Alan Bateman wrote: > The current implementation came about because of issues with several zip > tools so we have to be very careful changing it. Thanks for providing historical context, that's very useful! Do you happen to know a few of the zip tools the cur

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Lance Andersen
On Sun, 12 Feb 2023 15:41:55 GMT, Eirik Bjorsnos wrote: > ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descrip

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files

2023-03-29 Thread Alan Bateman
On Sun, 12 Feb 2023 15:41:55 GMT, Eirik Bjorsnos wrote: > ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descrip

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 06:52:35 GMT, ExE Boss wrote: > There is SortedMap, yes, but no sorted "collection". An interface with a special semantic for set, map or list do not have the same impact in term of number of lines to maintain than a collection with a special semantics. And java.util.Colle

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-29 Thread Eirik Bjorsnos
On Sat, 25 Mar 2023 08:19:18 GMT, Rémi Forax wrote: > I get that Oracle is rich, but this JEP is not only a burden for Oracle but > for the whole community. I'm going to have to call you out on this one, Remi. Since both of us are non-native Enlish speakers, I'm going to define "calling out"

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v2]

2023-03-29 Thread Eirik Bjorsnos
> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the > number of compressed or uncompressed bytes read from the inflater is larger > than the Zip64 magic value. > > While the ZIP format mandates that the data descriptor `SHOULD be stored in > ZIP64 format (as 8 byte values

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. Hi Erik,

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 11:28:39 GMT, Rémi Forax wrote: > Hi Erik, I think you misunderstood me, currently Oracle supports most of the > development of the OpenJDK financially, that's a fact and i'm glad that > Oracle has taken that mantle because I'm remembering very well the sad state > of Java

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Eirik Bjorsnos
> CorruptedZipFiles could benefit from some spring cleaning and a conversion to > testNG: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being > verified > - The setup code is moved to a `@Before` me

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. This is

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Eirik Bjorsnos
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. > This i

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Daniel Fuchs
On Wed, 29 Mar 2023 12:19:18 GMT, Eirik Bjorsnos wrote: >> CorruptedZipFiles could benefit from some spring cleaning and a conversion >> to testNG: >> >> - The actual tests are moved into their own `@Test` methods, given more >> meaningful names and a Javadoc comment explaining the constraint

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 13:23:19 GMT, Daniel Fuchs wrote: > High level comment: these days we usually try to use junit 5 / jupiter > instead of TestNG. I think my choice of testNG here might have been influenced by other ZIP area tests using testNG. I guess a rewrite to junit should be pretty stra

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v8]

2023-03-29 Thread Roger Riggs
> Runtime.exec and ProcessBuilder.start methods create a new operating system > process with the program and arguments. Many applications configure a logging > subsystem to monitor application events. Logging a process start message with > the program, arguments, and stack trace can identify the

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Roger Riggs
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). Marked as reviewed by rriggs (Reviewer). ---

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Eirik Bjorsnos
On Mon, 27 Feb 2023 21:13:47 GMT, Lance Andersen wrote: >> Eirik Bjorsnos 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 ten additional >> comm

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v15]

2023-03-29 Thread Jorn Vernee
On Wed, 29 Mar 2023 08:55:08 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Integrated: 8304990: unnecessary dash in @param gives double-dash in docs

2023-03-29 Thread Lance Andersen
On Tue, 28 Mar 2023 21:48:23 GMT, Lance Andersen wrote: > Please review this trivial change which removes a redundant `-` from an > `@param` and cleans up the formatting for the `isValid` method. > > > It looks like there is some additional formatting clean up that can be done > but I will h

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

2023-03-29 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: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Brian Burkhalter
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). Marked as reviewed by bpb (Reviewer). -

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Pavel Rappo
On Wed, 29 Mar 2023 09:03:58 GMT, Alan Bateman wrote: > > I thought the change would trigger a change in the public API as the > > modifiers are changed for the class. This would likely be picked up by > > compatibility checks and so, a CSR would be needed? > > It's not a compatibility issue b

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v3]

2023-03-29 Thread Brian Burkhalter
On Mon, 27 Feb 2023 22:05:20 GMT, Brian Burkhalter wrote: >> 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 ta

Re: RFR: 8304498: JShell does not switch to raw mode when there is no /bin/test [v2]

2023-03-29 Thread Jan Lahoda
On Tue, 28 Mar 2023 18:33:46 GMT, Andrey Turbanov wrote: > @lahodaj was the issue reported to the upstream? I've just filled: https://github.com/jline/jline3/issues/839 - PR Comment: https://git.openjdk.org/jdk/pull/13100#issuecomment-1488819982

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Lance Andersen
On Wed, 29 Mar 2023 13:30:21 GMT, Eirik Bjorsnos wrote: > > High level comment: these days we usually try to use junit 5 / jupiter > > instead of TestNG. > > I think my choice of testNG here might have been influenced by other ZIP area > tests using testNG. I guess a rewrite to junit should be

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to testNG [v2]

2023-03-29 Thread Lance Andersen
On Wed, 29 Mar 2023 15:21:04 GMT, Lance Andersen wrote: >>> High level comment: these days we usually try to use junit 5 / jupiter >>> instead of TestNG. >> >> I think my choice of testNG here might have been influenced by other ZIP >> area tests using testNG. I guess a rewrite to junit should

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

2023-03-29 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: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v3]

2023-03-29 Thread Sergey Tsypanov
On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov wrote: >> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire >> outdated. This simple clean-up modernizes them. > > Sergey Tsypanov has updated the pull request incrementally with one > additional commit since the last r

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Raffaello Giulietti
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). Would it make sense to throw an `AssertionError` in t

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v3]

2023-03-29 Thread Roger Riggs
On Mon, 27 Feb 2023 22:05:20 GMT, Brian Burkhalter wrote: >> 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 ta

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Roger Riggs
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). The CSR implies that java.util.Arrays has a non-priva

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Roger Riggs
On Wed, 29 Mar 2023 16:09:18 GMT, Raffaello Giulietti wrote: > > Would it make sense to throw an `AssertionError` in the constructor? Just in > case... It hardly seems worth the bytecode; the constructor could only be invoked by breaking in using reflection and the result would be an inst

Integrated: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions

2023-03-29 Thread Naoto Sato
On Tue, 28 Mar 2023 18:25:21 GMT, Naoto Sato wrote: > Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 > AM](https://user-images.githubusercontent.com/3122603/2283

Re: RFR: 8304840: Dangling `CharacterCodingException` in a few javadoc descriptions [v2]

2023-03-29 Thread Naoto Sato
> Fixing a documentation bug for `CharacterCodingException` without any > description to it as attached. A corresponding CSR is also drafted. > > ![Screenshot 2023-03-28 at 11 19 00 > AM](https://user-images.githubusercontent.com/3122603/228332508-74606c64-bce1-4135-a4cf-b0c76b902676.png) Naoto

Re: RFR: 8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree() [v2]

2023-03-29 Thread Naoto Sato
On Wed, 29 Mar 2023 08:16:32 GMT, Sergey Tsypanov wrote: >> 1) When `DateTimeFormatter` is reused we don't need to copy >> `availableZoneIds` and allocate `nonRegionIds` as PrefixTree can be taken >> from cache. In the related benchmark allocation of `HashSet` takes ~93% of >> all time, so avo

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Raffaello Giulietti
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). In some future, one could mistakenly instantiate the

Re: RFR: 8305157: The java.util.Arrays class should be declared final

2023-03-29 Thread Joe Darcy
On Wed, 29 Mar 2023 08:13:06 GMT, Per Minborg wrote: > Non-instantiable utility classes should be declared `final` and have a > private constructors. > > See Effective Java, Third Edition, Joshua Bloch (for example, Item 19 or Item > 22). > There are numerous examples in the JDK where we h

RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Aleksey Shipilev
Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The documentation for that method clearly says the precision and accuracy are dependent on the underlying system behavior. However, it always rounds up `nanos` to 1ms when doing the actual sleep. This means users cannot do t

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread David M . Lloyd
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Roger Riggs
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 16:48:41 GMT, David M. Lloyd wrote: > Are there specific factors which would make it unreasonable to implement > `sleep` in terms of `parkNanos`? After reading the Javadoc for `LockSupport`, I don't believe implementing `Thread.sleep` with `LockSupport.parkNanos` is a prope

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread David M . Lloyd
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Integrated: 8303392: Runtime.exec and ProcessBuilder.start should use System logger

2023-03-29 Thread Roger Riggs
On Fri, 3 Mar 2023 19:26:52 GMT, Roger Riggs wrote: > Runtime.exec and ProcessBuilder.start methods create a new operating system > process with the program and arguments. Many applications configure a logging > subsystem to monitor application events. Logging a process start message with > th

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v4]

2023-03-29 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 incrementally with one additional commit since the last revision: 8305157:

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
> CorruptedZipFiles could benefit from some spring cleaning and a conversion to > testNG: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being > verified > - The setup code is moved to a `@Before` me

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v2]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 15:24:41 GMT, Lance Andersen wrote: > Let's go with reviewing this version, Thank you for the update Eirik Good, I pushed the junit version to the PR. Also updated the JBS and PR titles. Big thanks to @dfuch for suggesting, your lower-level comments are also welcome! --

RFR: 8132995: Matcher$ImmutableMatchResult should be optimized to reduce space usage

2023-03-29 Thread Raffaello Giulietti
When appropriate and useful, copies only the relevant portion of the `CharSequence` to the match result. - Commit messages: - 8132995: Matcher should be optimized to reduce space usage Changes: https://git.openjdk.org/jdk/pull/13231/files Webrev: https://webrevs.openjdk.org/?repo=

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Sergey Tsypanov
On Wed, 29 Mar 2023 11:28:53 GMT, Aleksey Shipilev wrote: > Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The > documentation for that method clearly says the precision and accuracy are > dependent on the underlying system behavior. However, it always rounds up > `nan

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Daniel Fuchs
On Wed, 29 Mar 2023 18:15:42 GMT, Eirik Bjorsnos wrote: >> CorruptedZipFiles could benefit from some spring cleaning and a conversion >> to testNG: >> >> - The actual tests are moved into their own `@Test` methods, given more >> meaningful names and a Javadoc comment explaining the constraint

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Aleksey Shipilev
On Wed, 29 Mar 2023 18:10:30 GMT, Alan Bateman wrote: >> Java API has the `Thread.sleep(millis, nanos)` method exposed to users. The >> documentation for that method clearly says the precision and accuracy are >> dependent on the underlying system behavior. However, it always rounds up >> `nan

Integrated: 8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree()

2023-03-29 Thread Sergey Tsypanov
On Fri, 17 Feb 2023 09:50:16 GMT, Sergey Tsypanov wrote: > 1) When `DateTimeFormatter` is reused we don't need to copy > `availableZoneIds` and allocate `nonRegionIds` as PrefixTree can be taken > from cache. In the related benchmark allocation of `HashSet` takes ~93% of > all time, so avoidin

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 18:25:34 GMT, Daniel Fuchs wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Junit version > > test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java line 36: > >> 34: import org.junit.BeforeCla

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 18:35:04 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java line 36: >> >>> 34: import org.junit.BeforeClass; >>> 35: import org.junit.Test; >>> 36: >> >> I believe you should be using corresponding annotations from >> `org.junit.jupiter.ap

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 18:38:00 GMT, Eirik Bjorsnos wrote: >> Noob question: Do you know where I find the jars for setting up junit5 in my >> IDE? jtreg's `junit-platform-console-standalone-1.9.2` does not seem to >> include these annotations. > > Seems my dev environment has `jtreg` < 7. Maybe th

Re: RFR: 8304919: Implementation of Virtual Threads [v4]

2023-03-29 Thread Chris Plummer
On Wed, 29 Mar 2023 08:00:36 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The >>

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-29 Thread Chris Plummer
On Wed, 29 Mar 2023 07:27:50 GMT, Alan Bateman wrote: >> test/jdk/com/sun/management/ThreadMXBean/VirtualThreads.java line 143: >> >>> 141: long[] tids = new long[] { tid0, tid1 }; >>> 142: long[] cpuTimes = bean.getThreadCpuTime(tids); >>> 143: if (Thread.cur

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v4]

2023-03-29 Thread Eirik Bjorsnos
> CorruptedZipFiles could benefit from some spring cleaning and a conversion to > testNG: > > - The actual tests are moved into their own `@Test` methods, given more > meaningful names and a Javadoc comment explaining the constraint being > verified > - The setup code is moved to a `@Before` me

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Daniel Fuchs
On Wed, 29 Mar 2023 19:02:56 GMT, Eirik Bjorsnos wrote: >> Seems junit 5 support is a recent effort? >> >> https://mail.openjdk.org/pipermail/jdk-dev/2022-August/006869.html > > Scratch that. It seems my IDE was just not being very cooperative in > suggesting or finding JUnit 5 API. When I wro

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 18:50:27 GMT, Eirik Bjorsnos wrote: >> Seems my dev environment has `jtreg` < 7. Maybe that's a problem? > > Seems junit 5 support is a recent effort? > > https://mail.openjdk.org/pipermail/jdk-dev/2022-August/006869.html Scratch that. It seems my IDE was just not being ver

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, values, and entrySet views. src/java

Re: RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

2023-03-29 Thread Eirik Bjorsnos
On Wed, 29 Mar 2023 19:03:08 GMT, Daniel Fuchs wrote: >> Scratch that. It seems my IDE was just not being very cooperative in >> suggesting or finding JUnit 5 API. When I wrote the imports myself it seems >> to have improved its behaviour. >> >> Do you think it looks better now, @dfuch ? > > Y

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 19:06:20 GMT, Chen Liang wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedCollec

Re: RFR: 8304919: Implementation of Virtual Threads [v2]

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 18:47:03 GMT, Chris Plummer wrote: >> tid0 is the thread ID of a platform therad. tid1 is the threadID of a >> virtual thread. The only change here is allow this test run with the main >> wrapper plugin >> ([CODETOOLS-7903373](https://bugs.openjdk.org/browse/CODETOOLS-79033

Re: RFR: 8304919: Implementation of Virtual Threads [v4]

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 18:30:01 GMT, Chris Plummer wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix ThreadSleepEvent again > > test/hotspot/jtreg/serviceability/jvmti/thread/GetFrameCount/framecnt01/framecnt01.java

Re: RFR: 8302819: Remove JAR Index [v2]

2023-03-29 Thread Eirik Bjorsnos
> This PR removes the JAR index feature from the runtime: > > - `URLClassPath` is updated to remove the `enableJarIndex` system property > and any code which would be called when this property was `true` > - The `JarIndex` implementation class is moved into `jdk.jartool` module. > - The `Invalid

Re: RFR: 8302819: Remove JAR Index [v2]

2023-03-29 Thread Eirik Bjorsnos
On Tue, 28 Mar 2023 20:06:03 GMT, Mandy Chung wrote: >> Eirik Bjorsnos 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 11 additional >> commits

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Tagir F . Valeev
On Wed, 29 Mar 2023 19:20:16 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/util/SequencedCollection.java line 107: >> >>> 105: */ >>> 106: default void addFirst(E e) { >>> 107: throw new UnsupportedOperationException(); >> >> Can this be defaulted to `this.reversed

Re: RFR: 8305092: Improve Thread.sleep(millis, nanos) for sub-millisecond granularity

2023-03-29 Thread Alan Bateman
On Wed, 29 Mar 2023 18:29:18 GMT, Aleksey Shipilev wrote: > Yes, let me fix that. `TimeUnit.toNanos` handles it well itself, it seems. This code is refactored in PR 13203 so we'll have to merge at some point. - PR Review Comment: https://git.openjdk.org/jdk/pull/13225#discussion_r1

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 19:54:48 GMT, Tagir F. Valeev wrote: >> In the same spirit, `reversed()` should also have a default implementation >> equivalent to >> >> >> Collections.unmodifiableSequenceCollection(Arrays.asList(this.toArray())).reversed() > > @forax but this would not be a view: chang

Re: RFR: 8304919: Implementation of Virtual Threads [v4]

2023-03-29 Thread Chris Plummer
On Wed, 29 Mar 2023 08:00:36 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The >>

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v4]

2023-03-29 Thread Joe Wang
> Add a system property, jdk.xml.config.file, to return the path to a custom > JAXP configuration file. The current configuration file, jaxp.properties, > that the JDK supports will become the default configuration file. > > CSR: https://bugs.openjdk.org/browse/JDK-8303531 > > Tests: XML SQE an

Re: RFR: 8303530: Add system property for custom JAXP configuration file [v5]

2023-03-29 Thread Joe Wang
> Add a system property, jdk.xml.config.file, to return the path to a custom > JAXP configuration file. The current configuration file, jaxp.properties, > that the JDK supports will become the default configuration file. > > CSR: https://bugs.openjdk.org/browse/JDK-8303531 > > Tests: XML SQE an

  1   2   >