Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-02 Thread Jan Lahoda
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Looks good to me, thanks! - Marked as reviewed by jlahoda (Reviewer). PR Review: https://git.openjdk.org/

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Kevin Bourrillion
Most users don't and won't know anything about "affine spaces" *per se*, however, it's not a super unusual relationship for two types to have. A few examples Point2D and Vector2D Instant and Duration Pitch and Interval (i.e. music theory) If Java has operator overloading one day, I would feel it

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v3]

2024-05-02 Thread Nizar Benalla
On Fri, 3 May 2024 00:25:16 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest releas

Re: RFR: 8323707: Adjust Classfile API's type arg model to better represent the embodied type [v5]

2024-05-02 Thread Chen Liang
On Wed, 1 May 2024 22:39:05 GMT, Chen Liang wrote: >> API changes as discussed on the mailing list: >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html >> >> Additional questions: >> 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE` > > Chen Liang has upda

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v3]

2024-05-02 Thread Nizar Benalla
> This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in which > the given API element was introduced. That is:

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v2]

2024-05-02 Thread Nizar Benalla
> This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in which > the given API element was introduced. That is:

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Nizar Benalla
On Wed, 1 May 2024 23:28:20 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest releas

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-02 Thread Joe Wang
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Marked as reviewed by joehw (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/19070#pullrequestrev

Re: RFR: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Alexander Zvegintsev
On Thu, 2 May 2024 21:19:14 GMT, Phil Race wrote: > I see you added test.lib.Platform.isOnWayland() in this PR > https://github.com/openjdk/jdk/pull/18995/files#diff-a1fe81399728999601f16ae9aaf5caae27f009c394377d2cd86c71f6d5e0e54c > > So, that helps me understand why it is a new problem, but I

Integrated: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Alexander Zvegintsev
On Thu, 2 May 2024 21:05:38 GMT, Alexander Zvegintsev wrote: > Trivial fix. This pull request has now been integrated. Changeset: 01125fa2 Author:Alexander Zvegintsev URL: https://git.openjdk.org/jdk/commit/01125fa21b733199d4fe670ecf38b82cd917e242 Stats: 2 lines in 1 file chang

Re: RFR: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Phil Race
On Thu, 2 May 2024 21:05:38 GMT, Alexander Zvegintsev wrote: > Trivial fix. Marked as reviewed by prr (Reviewer). OK. I see. The problem is that the test is out of sync with the actual usage of Platform. Arguably isOnWayland() and all these others should be in some OTHER class entirely. Some

Re: RFR: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Phil Race
On Thu, 2 May 2024 21:05:38 GMT, Alexander Zvegintsev wrote: > Trivial fix. I see you added test.lib.Platform.isOnWayland() in this PR https://github.com/openjdk/jdk/pull/18995/files#diff-a1fe81399728999601f16ae9aaf5caae27f009c394377d2cd86c71f6d5e0e54c So, that helps me understand why it is a

Re: RFR: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Phil Race
On Thu, 2 May 2024 21:05:38 GMT, Alexander Zvegintsev wrote: > Trivial fix. I'd love to approve this but could you please explain what this is about ? I see the failure log in the bug report but I am none the wiser. Why exactly is this a problem ? - PR Comment: https://git.openjd

RFR: 8331605: jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java test failure

2024-05-02 Thread Alexander Zvegintsev
Trivial fix. - Commit messages: - initial Changes: https://git.openjdk.org/jdk/pull/19071/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19071&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331605 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: htt

RFR: 8331582: Incorrect default Console provider comment

2024-05-02 Thread Naoto Sato
Fixing a comment in `java.io.Console`, which was a leftover from the fix to https://bugs.openjdk.org/browse/JDK-8308591 - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/19070/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19070&range=00 Issu

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Naoto Sato
`Temporal` interface is clear that its `minus` methods return objects of the same `Temporal` type, and `until` calculates the amount of time until another `Temporal` type. Introducing `Instant.minus` that returns `Duration` would be confusing to me. Naoto On 5/2/24 10:41 AM, Éamonn McManus wr

Re: RFR: 8330542: Add two JAXP configuration files in preparation for a secure by default configuration [v6]

2024-05-02 Thread Sean Mullan
On Wed, 1 May 2024 22:33:29 GMT, Joe Wang wrote: >> Add two sample configuration files: >> >> jaxp-strict.properties: used to set strict configuration, stricter than >> jaxp.properties in previous versions such as JDK 22 >> >> jaxp-compat.properties: used to regain compatibility from any m

Integrated: 8331320: ClassFile API OutOfMemoryError with certain class files

2024-05-02 Thread Adam Sotona
On Tue, 30 Apr 2024 15:31:02 GMT, Adam Sotona wrote: > Class files with specifically corrupted tableswitch or lookupswitch > instructions in the bytecode cause OutOfMemoryError while parsing with > Class-File API. > This patch performs additional checks to avoid OOME and adds relevant tests. >

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Éamonn McManus
I'd say too that this makes intuitive sense based on algebra. If we have: *instant1* + *duration* = *instant2* then we can subtract *duration* from both sides: *instant1 = instant2 - duration* or we can subtract *instant1* from both sides: *duration = instant2 - instant1* There's no manipulation w

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Louis Wasserman
That doesn't follow for me at all. The structure formed by Instants and Durations is an affine space , with instants the points and durations the vectors. (An affine space is a vector space without a distinguished origin, which of course Inst

Re: RFR: 8328995: launcher can't open jar files where the offset of the manifest is >4GB [v6]

2024-05-02 Thread Alan Bateman
On Thu, 2 May 2024 17:17:54 GMT, Liam Miller-Cushon wrote: > Please keep this open, assistance on progressing this pull request is welcome ACK. There was a lengthy bug tail when zip64 support was added. We've got away without needing this for executable JAR files for a long time so it's great t

Re: RFR: 8328995: launcher can't open jar files where the offset of the manifest is >4GB [v6]

2024-05-02 Thread Liam Miller-Cushon
On Thu, 4 Apr 2024 16:57:40 GMT, Liam Miller-Cushon wrote: >> This change fixes a zip64 bug in the launcher that is prevent it from >> reading the manifest of jars where the 'relative offset of local header' >> field in the central directory entry is >4GB. As described in APPNOTE.TXT >> 4.5.3,

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Stephen Colebourne
On Thu, 2 May 2024 at 15:58, Kurt Alfred Kluever wrote: > instant − instant = duration // what we're discussing > instant + duration = instant // satisfied by instant.plus(duration) > instant - duration = instant // satisfied by instant.minus(duration) > duration + duration = duration // satisfied

Re: RFR: 8331202: Support for Duration until another Instant [v3]

2024-05-02 Thread Naoto Sato
On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato wrote: >> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > >

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files [v2]

2024-05-02 Thread Paul Sandoz
On Thu, 2 May 2024 11:13:22 GMT, Adam Sotona wrote: >> Class files with specifically corrupted tableswitch or lookupswitch >> instructions in the bytecode cause OutOfMemoryError while parsing with >> Class-File API. >> This patch performs additional checks to avoid OOME and adds relevant tests.

Re: In support of Instant.minus(Instant)

2024-05-02 Thread Kurt Alfred Kluever
Hi all, Thanks for filing JDK-8331202 (https://bugs.openjdk.org/browse/JDK-8331202). I think this proposal is definitely a step in the right direction. The Instant instance method is much more discoverable than the Duration static method. I also think there's a much lower chance of users accident

Re: RFR: 8331202: Support for Duration until another Instant [v3]

2024-05-02 Thread Roger Riggs
On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato wrote: >> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > >

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Hannes Wallnöfer
On Wed, 24 Apr 2024 14:10:29 GMT, Nizar Benalla wrote: > This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v4]

2024-05-02 Thread Chen Liang
On Thu, 2 May 2024 11:08:16 GMT, Adam Sotona wrote: >> Hi, >> During performance optimization work on Class-File API as JDK lambda >> generator we found some static initialization killers. >> One of them is `java.lang.classfile.Attributes` with tens of static fields >> initialized with individu

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Hannes Wallnöfer
On Wed, 24 Apr 2024 14:10:29 GMT, Nizar Benalla wrote: > This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Hannes Wallnöfer
On Wed, 24 Apr 2024 14:10:29 GMT, Nizar Benalla wrote: > This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Hannes Wallnöfer
On Wed, 24 Apr 2024 14:10:29 GMT, Nizar Benalla wrote: > This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module

2024-05-02 Thread Nizar Benalla
On Wed, 24 Apr 2024 14:10:29 GMT, Nizar Benalla wrote: > This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in

Re: RFR: 8331202: Support for Duration until another Instant [v3]

2024-05-02 Thread Eamonn McManus
On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato wrote: >> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > >

Re: RFR: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module [v5]

2024-05-02 Thread Raffaello Giulietti
On Tue, 30 Apr 2024 10:21:49 GMT, Raffaello Giulietti wrote: >> Move all random generators mandated in package `java.util.random` and >> currently implemented in module `jdk.random` to module `java.base`, and >> remove module `jdk.random`. > > Raffaello Giulietti has updated the pull request i

Integrated: 8331511: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Adam Sotona
On Thu, 2 May 2024 09:01:22 GMT, Adam Sotona wrote: > This patch removes "Classpath" exception from > test/jdk/jdk/classfile/OptionsTest.java header. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: 257a07d5 Author:Adam Sotona URL: https

Re: RFR: 8182774: Verify code in javap [v2]

2024-05-02 Thread Adam Sotona
> This patch adds `javap -verify` option to check the class and print obvious > verification errors found. > Implementation depends on extended Class-File API verification support, so PR > #16809 is important to precede. > The new `javap` option is mentioned in man pages and a release note will b

Re: RFR: 8330005: RandomGeneratorFactory.getDefault() throws exception when the runtime image only has java.base module [v5]

2024-05-02 Thread Alan Bateman
On Tue, 30 Apr 2024 10:21:49 GMT, Raffaello Giulietti wrote: >> Move all random generators mandated in package `java.util.random` and >> currently implemented in module `jdk.random` to module `java.base`, and >> remove module `jdk.random`. > > Raffaello Giulietti has updated the pull request i

Re: RFR: 8331511: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Jaikiran Pai
On Thu, 2 May 2024 09:01:22 GMT, Adam Sotona wrote: > This patch removes "Classpath" exception from > test/jdk/jdk/classfile/OptionsTest.java header. > > Please review. > > Thanks, > Adam This copyright text only change looks good to me. - Marked as reviewed by jpai (Reviewer).

RFR: 8182774: Verify code in javap

2024-05-02 Thread Adam Sotona
This patch adds `javap -verify` option to check the class and print obvious verification errors found. Implementation depends on extended Class-File API verification support, so PR #16809 is important to precede. The new `javap` option is mentioned in man pages and a release note will be provide

Integrated: 8331077 : nroff man page update for jar tool

2024-05-02 Thread Weibing Xiao
On Wed, 1 May 2024 17:52:13 GMT, Weibing Xiao wrote: > nroff man page update for jar tool. > This update is caused by the change of  > https://bugs.openjdk.org/browse/JDK-8318971. While the .md man pages got > updated in other repos, the corresponding nroff man page was never updated in > Open

Re: RFR: 8331320: ClassFile API OutOfMemoryError with certain class files [v2]

2024-05-02 Thread Adam Sotona
> Class files with specifically corrupted tableswitch or lookupswitch > instructions in the bytecode cause OutOfMemoryError while parsing with > Class-File API. > This patch performs additional checks to avoid OOME and adds relevant tests. > > Please review. > > Thank you, > Adam Adam Sotona h

Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v4]

2024-05-02 Thread Adam Sotona
> Hi, > During performance optimization work on Class-File API as JDK lambda > generator we found some static initialization killers. > One of them is `java.lang.classfile.Attributes` with tens of static fields > initialized with individual attribute mappers, and common set of all mappers, > and

Re: RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v12]

2024-05-02 Thread Adam Sotona
> java.base java.lang.invoke package heavily uses ASM to generate lambdas and > method handles. > > This patch converts ASM calls to Classfile API. > > This PR is continuation of https://github.com/openjdk/jdk/pull/12945 > > Any comments and suggestions are welcome. > > Please review. > > Tha

Integrated: 8331514: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Jaikiran Pai
On Thu, 2 May 2024 04:29:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this copyright text only change which removes > the "Classpath" exception from the > `test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java` test file and > thus addresses https://bugs.openjdk.org/browse/

Re: RFR: 8331514: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Jaikiran Pai
On Thu, 2 May 2024 04:29:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this copyright text only change which removes > the "Classpath" exception from the > `test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java` test file and > thus addresses https://bugs.openjdk.org/browse/

Re: RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v4]

2024-05-02 Thread Adam Sotona
> ClassFile API `jdk.internal.classfile.verifier.VerifierImpl` performed only > bytecode-level class verification. > This patch adds `jdk.internal.classfile.verifier.ParserVerifier` with > additional class checks inspired by > `hotspot/share/classfile/classFileParser.cpp`. > > Also new `Verifie

Integrated: 8323058: Revisit j.l.classfile.CodeBuilder API surface

2024-05-02 Thread Adam Sotona
On Fri, 5 Jan 2024 15:17:13 GMT, Adam Sotona wrote: > `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming > conventions, some

RFR: 8331511: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Adam Sotona
This patch removes "Classpath" exception from test/jdk/jdk/classfile/OptionsTest.java header. Please review. Thanks, Adam - Commit messages: - 8331511: Tests should not use the "Classpath" exception form of the legal header Changes: https://git.openjdk.org/jdk/pull/19050/files

Re: RFR: 8331514: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Daniel Fuchs
On Thu, 2 May 2024 04:29:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this copyright text only change which removes > the "Classpath" exception from the > `test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java` test file and > thus addresses https://bugs.openjdk.org/browse/

Re: RFR: 8331518: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Tobias Hartmann
On Thu, 2 May 2024 05:57:50 GMT, Tobias Hartmann wrote: > Removed the Classpath exception from the copyright header of some compiler > tests and benchmarks. > > Thanks, > Tobias Thanks for the review David! - PR Comment: https://git.openjdk.org/jdk/pull/19047#issuecomment-2089828

Integrated: 8331518: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread Tobias Hartmann
On Thu, 2 May 2024 05:57:50 GMT, Tobias Hartmann wrote: > Removed the Classpath exception from the copyright header of some compiler > tests and benchmarks. > > Thanks, > Tobias This pull request has now been integrated. Changeset: d3bf5262 Author:Tobias Hartmann URL: https://git.

Re: RFR: 8331518: Tests should not use the "Classpath" exception form of the legal header

2024-05-02 Thread David Holmes
On Thu, 2 May 2024 05:57:50 GMT, Tobias Hartmann wrote: > Removed the Classpath exception from the copyright header of some compiler > tests and benchmarks. > > Thanks, > Tobias LGTM. Thanks. I'd consider this a trivial fix too. - Marked as reviewed by dholmes (Reviewer). PR Rev

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v7]

2024-05-02 Thread Adam Sotona
> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming > conventions, some frequently used methods are hard to find and some met