Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v2]

2023-03-29 Thread Amit Kumar
On Mon, 6 Mar 2023 11:07:26 GMT, Jaikiran Pai wrote: >Now coming to this proposed patch, now that you are using local >ByteArrayOutputStream(s) for the deflate/inflate part in this check() method, >I think the out1 and out2 should no longer be needed in this method and thus >the method

Re: RFR: 8299748: java/util/zip/Deinflate.java failing on s390x [v3]

2023-03-29 Thread Amit Kumar
> DeInflate.java test fails on s390x platform because size for out1 array which > is responsible for storing the compressed data is insufficient. And being > unable to write whole compressed data on array, on s390 whole data can't be > recovered after compression. So this fix increase Array

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

2023-03-29 Thread David Holmes
On Wed, 29 Mar 2023 17:17:29 GMT, Aleksey Shipilev wrote: > Are there specific factors which would make it unreasonable to implement > `sleep` in terms of `parkNanos`? You would need to reissue any unparks received whilst sleeping. Sleeping and parking are distinct thread states so it would

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

2023-03-29 Thread David Holmes
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 >

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE [v2]

2023-03-29 Thread Jaikiran Pai
On Thu, 30 Mar 2023 01:15:33 GMT, Mandy Chung wrote: >> A simple fix to `Method::invoke` which wraps IAE with >> `InvocationTargetException` twice if it's thrown by a caller-sensitive >> method which has no adapter. > > Mandy Chung has updated the pull request incrementally with one additional

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE [v2]

2023-03-29 Thread Mandy Chung
> A simple fix to `Method::invoke` which wraps IAE with > `InvocationTargetException` twice if it's thrown by a caller-sensitive method > which has no adapter. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: the test should fail if

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Mandy Chung
On Thu, 30 Mar 2023 00:50:11 GMT, Chen Liang wrote: >> not following what you mean. Can you elaborate? > > Though very unlikely, I recommend adding a line of `Assertions.fail("Should > not reach here");` after the `m.invoke` and before the catch to ensure the > invocation always throw

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Chen Liang
On Thu, 30 Mar 2023 00:40:46 GMT, Mandy Chung wrote: >> test/jdk/java/lang/reflect/Method/CallerSensitiveMethodInvoke.java line 56: >> >>> 54: Method m = Field.class.getDeclaredMethod("get", >>> Object.class); >>> 55: m.invoke(f, new Object()); >>> 56: } catch

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Wed, 29 Mar 2023 21:18:04 GMT, Rémi Forax wrote: >> In the JEP, it says: >>> Any modifications to the original collection are visible in the view. >> >> If we don't have an efficient reversed view, I don't see a point of >> declaring a collection sequenced; same reason for declaring a >>

Re: RFR: 8305111: Locale.lookupTag has typo in parameter

2023-03-29 Thread Naoto Sato
On Wed, 29 Mar 2023 22:51:12 GMT, Justin Lu wrote: > Small typo fix in Locale.lookupTag > > _tangs_ should be _tags_ Marked as reviewed by naoto (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13235#pullrequestreview-1364170271

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Mandy Chung
On Wed, 29 Mar 2023 23:58:59 GMT, Chen Liang wrote: >> A simple fix to `Method::invoke` which wraps IAE with >> `InvocationTargetException` twice if it's thrown by a caller-sensitive >> method which has no adapter. > > test/jdk/java/lang/reflect/Method/CallerSensitiveMethodInvoke.java line 56:

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

2023-03-29 Thread Maurizio Cimadamore
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: >>

Re: RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Chen Liang
On Wed, 29 Mar 2023 21:26:24 GMT, Mandy Chung wrote: > A simple fix to `Method::invoke` which wraps IAE with > `InvocationTargetException` twice if it's thrown by a caller-sensitive method > which has no adapter. test/jdk/java/lang/reflect/Method/CallerSensitiveMethodInvoke.java line 56: >

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

2023-03-29 Thread Maurizio Cimadamore
On Wed, 29 Mar 2023 22:32:20 GMT, Paul Sandoz wrote: >> I've updated the specs as per how I interpret the comments above. Let me >> know your thoughts on this. > > This is much clearer. Are the names of the struct members guaranteed to be > symbols that can be found up via the linker's default

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

2023-03-29 Thread Maurizio Cimadamore
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: >>

Re: RFR: 8305111: Locale.lookupTag has typo in parameter

2023-03-29 Thread Iris Clark
On Wed, 29 Mar 2023 22:51:12 GMT, Justin Lu wrote: > Small typo fix in Locale.lookupTag > > _tangs_ should be _tags_ Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13235#pullrequestreview-1364106018

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v5]

2023-03-29 Thread Naoto Sato
On Tue, 28 Mar 2023 21:06:34 GMT, Justin Lu wrote: >> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` >> rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and >> `DAY_OF_WEEK` combo. >> >> For example, Rolling _Monday, 30 December 2019_ by 1 week produced

Re: RFR: 8305111: Locale.lookupTag has typo in parameter

2023-03-29 Thread Lance Andersen
On Wed, 29 Mar 2023 22:51:12 GMT, Justin Lu wrote: > Small typo fix in Locale.lookupTag > > _tangs_ should be _tags_ Marked as reviewed by lancea (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13235#pullrequestreview-1364100110

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

2023-03-29 Thread Mandy Chung
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

Is there such a thing as a customizable SAX Contenthandler which works as a XPath observer of sorts?

2023-03-29 Thread Albretch Mueller
SAX Content handlers do parse data in one go with very little to no overhead whatsoever, but for each XML file with a differently layout or if you need something different out of the same XML file, you will need to code a corresponding content handler. There is also the problem that not all

RFR: 8305111: Locale.lookupTag has typo in parameter

2023-03-29 Thread Justin Lu
Small typo fix in Locale.lookupTag _tangs_ should be _tags_ - Commit messages: - Fix typo Changes: https://git.openjdk.org/jdk/pull/13235/files Webrev: https://webrevs.openjdk.org/?repo=jdk=13235=00 Issue: https://bugs.openjdk.org/browse/JDK-8305111 Stats: 1 line in 1 file

Re: RFR: 8304871: Use default visibility for static library builds [v2]

2023-03-29 Thread David Holmes
On Mon, 27 Mar 2023 09:40:22 GMT, Severin Gehwolf wrote: >> Please review this change for symbol visibility of static library artefacts. >> This fixes an issue when >> OpenJDK is being used as a base for generating native images preventing the >> symbols from being >> exported and looked up

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

2023-03-29 Thread Paul Sandoz
On Wed, 22 Mar 2023 14:07:14 GMT, Per Minborg wrote: >> Back to @PaulSandoz question - "how does the caller know what the structure >> contains?". The caller typically doesn't care too much about what the >> returned struct is. But it might care about which "values" can be captured. >> That

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

2023-03-29 Thread Paul Sandoz
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: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Joe Darcy
On Wed, 29 Mar 2023 21:26:24 GMT, Mandy Chung wrote: > A simple fix to `Method::invoke` which wraps IAE with > `InvocationTargetException` twice if it's thrown by a caller-sensitive method > which has no adapter. Looks fine. - Marked as reviewed by darcy (Reviewer). PR Review:

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Chen Liang
On Wed, 29 Mar 2023 20:05:10 GMT, Rémi Forax wrote: >> @forax but this would not be a view: changes in the underlying collection >> won't be reflected > > Yes, > The spec says :"Changes to the underlying collection might or might not be > visible in this reversed view, depending upon the

Re: RFR: 8266571: Sequenced Collections [v4]

2023-03-29 Thread Rémi Forax
On Wed, 29 Mar 2023 20:54:15 GMT, Chen Liang wrote: >> Yes, >> The spec says :"Changes to the underlying collection might or might not be >> visible in this reversed view, depending upon the implementation." so i >> believe the default implementation i proposed is a valid implementation > > In

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. In the

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v16]

2023-03-29 Thread Jaikiran Pai
On Tue, 28 Mar 2023 11:02:46 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use test.jdk system property in test > > test/jdk/tools/jlink/plugins/CDSPluginTest.java line 97: > >> 95:

RFR: 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

2023-03-29 Thread Mandy Chung
A simple fix to `Method::invoke` which wraps IAE with `InvocationTargetException` twice if it's thrown by a caller-sensitive method which has no adapter. - Commit messages: - 8304585: Method::invoke rewraps InvocationTargetException if a caller-sensitive method throws IAE

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

2023-03-29 Thread Paul Sandoz
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 [v4]

2023-03-29 Thread Leonid Mesnik
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 [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

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

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: 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:

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:

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

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: 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

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 > >

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 >>

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 ? > >

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. > >

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.

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

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

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`

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

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: 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

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 >>

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

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

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 >>

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 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 >

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:

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!

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`

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 >

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:

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 >

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 >

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

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 >

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 >

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 >

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

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

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: 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

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)

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 >

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

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

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

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

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

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

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

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

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: 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

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

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: 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

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

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: >>

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 >>

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: 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

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

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: 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

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: 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`

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: 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

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

  1   2   >