Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Alan Bateman
On Sat, 17 May 2025 19:42:39 GMT, Nizar Benalla wrote: > Please review this patch to fix some `javadoc` bugs in `java.base`. > Certain `@link` tags used to refer to private fields instead of public APIs. > > A couple of `@see` tags in the [serialization > page](https://download.java.net/java/ea

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Alan Bateman
On Sat, 17 May 2025 19:42:39 GMT, Nizar Benalla wrote: > Please review this patch to fix some `javadoc` bugs in `java.base`. > Certain `@link` tags used to refer to private fields instead of public APIs. > > A couple of `@see` tags in the [serialization > page](https://download.java.net/java/ea

Re: RFR: 8355563: VectorAPI: Refactor current implementation of subword gather load API

2025-05-19 Thread Emanuel Peter
On Tue, 20 May 2025 02:22:13 GMT, Xiaohong Gong wrote: >> Ping again~ could any one please take a look at this PR? Thanks a lot! > >> Hi @XiaohongGong , Very nice work!, Looks good to me, will do some testing >> and get back. >> >> Do you have any idea about following regression? >> >> ``` >>

Re: RFR: 8355563: VectorAPI: Refactor current implementation of subword gather load API

2025-05-19 Thread Xiaohong Gong
On Tue, 20 May 2025 02:22:13 GMT, Xiaohong Gong wrote: >> Ping again~ could any one please take a look at this PR? Thanks a lot! > >> Hi @XiaohongGong , Very nice work!, Looks good to me, will do some testing >> and get back. >> >> Do you have any idea about following regression? >> >> ``` >>

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-19 Thread Jaikiran Pai
On Wed, 30 Apr 2025 22:26:30 GMT, Chen Liang wrote: >> In offline discussion, we noted that the documentation on this annotation >> does not recommend minimizing the intrinsified section and moving whatever >> can be done in Java to Java; thus I prepared this documentation update, to >> shrink

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-19 Thread Jaikiran Pai
On Fri, 16 May 2025 19:55:58 GMT, John R Rose wrote: >> Chen Liang 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 eight additional >> commits s

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-19 Thread Jaikiran Pai
On Wed, 30 Apr 2025 22:26:30 GMT, Chen Liang wrote: >> In offline discussion, we noted that the documentation on this annotation >> does not recommend minimizing the intrinsified section and moving whatever >> can be done in Java to Java; thus I prepared this documentation update, to >> shrink

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 06:59:58 GMT, Jaikiran Pai wrote: >>> I read this sentence a couple of times [...] >> >> Please see >> [a86610d](https://github.com/openjdk/jdk/pull/24728/commits/a86610d06169445a5c4b81a0c60527130a45e045). >> >>> I suspect that sentence was motivated from similar existing t

RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-19 Thread Tagir F . Valeev
Implementation of Comparator.min and Comparator.max methods. Preliminary discussion is in this thread: https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html The specification is mostly composed of Math.min/max and Collections.min/max specifications. The methods are quite trivial

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-19 Thread Jaikiran Pai
On Fri, 16 May 2025 18:37:38 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/Reader.java line 478: >> >>> 476: * >>> 477: * If an I/O error occurs reading from the stream, then it >>> 478: * may do so after some, but not all, characters have been read. >> >>

Integrated: 8357016: Candidate main methods not computed properly

2025-05-19 Thread Jan Lahoda
On Thu, 15 May 2025 16:42:48 GMT, Jan Lahoda wrote: > A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); > } > } > > > The `MethodFinder` will

Re: Towards a JSON API for the JDK

2025-05-19 Thread Remi Forax
- Original Message - > From: "cay horstmann" > To: "core-libs-dev" > Sent: Sunday, May 18, 2025 7:55:12 AM > Subject: Re: Towards a JSON API for the JDK Hello Cay, > +1 for having a JSON battery included with the JDK. And for "Our primary goal > is > that the library be simple to use f

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v16]

2025-05-19 Thread Jan Lahoda
On Thu, 15 May 2025 22:32:12 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J"

2025-05-19 Thread Jaikiran Pai
On Wed, 14 May 2025 14:40:41 GMT, Manuel Hässig wrote: > When passing `-J-version` to the patched javac, > `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds > to the expected version output. However, if the build id of the JDK running > this test contains the substrin

Re: RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J" [v2]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 09:10:21 GMT, Manuel Hässig wrote: >> When passing `-J-version` to the patched javac, >> `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds >> to the expected version output. However, if the build id of the JDK running >> this test contains the subs

Re: RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J" [v2]

2025-05-19 Thread Manuel Hässig
> When passing `-J-version` to the patched javac, > `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds > to the expected version output. However, if the build id of the JDK running > this test contains the substring "-J", then the test fails incorrectly at: > > https://

Re: RFR: 8357081: Removed unused methods of HexDigits

2025-05-19 Thread Jaikiran Pai
On Thu, 15 May 2025 22:03:22 GMT, Shaojin Wen wrote: > In HexDigits, getCharsLatin1 and getCharsUTF16 are no longer used, so remove > these methods It does indeed look like these are unused. The change looks OK to me but please wait for one more review from someone more familiar with this code

Re: RFR: 8357106: Add missing classpath exception copyright headers

2025-05-19 Thread duke
On Fri, 16 May 2025 07:04:04 GMT, Sorna Sarathi N wrote: > This PR adds missing classpath exception @Sorna-Sarathi Your change (at version 1b55b287f84d5cad1958aec440f3b499a874b04c) is now ready to be sponsored by a Committer. - PR Comment: https://git.openjdk.org/jdk/pull/25261#i

Re: RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J" [v2]

2025-05-19 Thread Manuel Hässig
On Mon, 19 May 2025 09:13:14 GMT, Manuel Hässig wrote: >> When passing `-J-version` to the patched javac, >> `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds >> to the expected version output. However, if the build id of the JDK running >> this test contains the subs

Re: RFR: 8357106: Add missing classpath exception copyright headers

2025-05-19 Thread Jaikiran Pai
On Fri, 16 May 2025 07:04:04 GMT, Sorna Sarathi N wrote: > This PR adds missing classpath exception The change looks good to me. - Marked as reviewed by jpai (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25261#pullrequestreview-2850053263

Re: RFR: 8357178: Simplify Class::componentType [v2]

2025-05-19 Thread Per Minborg
On Mon, 19 May 2025 00:22:08 GMT, Chen Liang wrote: >> `isArray` and null return is now redundant when `componentType` is changed >> to an explicit field. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > For parity with MT.de

Re: RFR: 8077587: BigInteger Roots [v17]

2025-05-19 Thread fabioromano1
> This PR implements nth root computation for BigIntegers using Newton method. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Code simplification - Changes: - all: https://git.openjdk.org/jdk/pull/24898/files - new:

Integrated: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J"

2025-05-19 Thread Manuel Hässig
On Wed, 14 May 2025 14:40:41 GMT, Manuel Hässig wrote: > When passing `-J-version` to the patched javac, > `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds > to the expected version output. However, if the build id of the JDK running > this test contains the substrin

Re: RFR: 8356974: tools/launcher/ToolsOpts.java fails if the build id contains "-J" [v2]

2025-05-19 Thread duke
On Mon, 19 May 2025 09:13:14 GMT, Manuel Hässig wrote: >> When passing `-J-version` to the patched javac, >> `tools/launcher/ToolsOpts.java` wants to verify that the output corresponds >> to the expected version output. However, if the build id of the JDK running >> this test contains the subs

Re: RFR: 8357178: Simplify Class::componentType [v2]

2025-05-19 Thread Chen Liang
On Mon, 19 May 2025 09:10:23 GMT, Per Minborg wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> For parity with MT.descriptorString > > Question: Why was this overload added in the first place, as it seems > equivalen

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v10]

2025-05-19 Thread Daniel Fuchs
On Fri, 16 May 2025 11:42:08 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enab

Re: RFR: 8355563: VectorAPI: Refactor current implementation of subword gather load API

2025-05-19 Thread Jatin Bhateja
On Mon, 19 May 2025 03:10:46 GMT, Xiaohong Gong wrote: >> JDK-8318650 introduced hotspot intrinsification of subword gather load APIs >> for X86 platforms [1]. However, the current implementation is not optimal >> for AArch64 SVE platform, which natively supports vector instructions for >> sub

RFR: 8356629: Incorrect use of {@linkplain} in java.sql

2025-05-19 Thread Nizar Benalla
Please review this trivial patch to fix a javadoc bug. TIA - Commit messages: - use PseudoColumnUsage#name() instead - fix incorrect `@link` tags Changes: https://git.openjdk.org/jdk/pull/25286/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25286&range=00 Issue: https

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 15:38:33 GMT, Lance Andersen wrote: >> src/jdk.zipfs/share/classes/module-info.java line 299: >> >>> 297: * >>> 298: * Any other values will cause an {@code >>> IllegalArgumentException} >>> 299: * to be thrown. >> >> The wording lo

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 15:19:26 GMT, Lance Andersen wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 230: >> >>> 228: // It requires 'entryLookup' and 'readOnly' to have safe >>> defaults (which >>> 229: // is why they are the only non-final fields), and

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Wed, 14 May 2025 16:42:07 GMT, Lance Andersen wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changes based on review feedback. > > test/jdk/jdk/nio/zipfs/TestPosix.java line 434: > >> 432: createTest

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 15:17:40 GMT, Lance Andersen wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 221: >> >>> 219: } >>> 220: // sm and existence check >>> 221: zfpath.getFileSystem().provider().checkAccess(zfpath, >>> java.nio.file.AccessMode.

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v16]

2025-05-19 Thread Johannes Döbler
On Thu, 15 May 2025 22:32:12 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 14:23:38 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changes based on review feedback. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 114: > >> 11

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 15:35:18 GMT, Lance Andersen wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 259: >> >>> 257: >>> 258: // Pass "this" as a parameter after everything else is set up. >>> 259: this.rootdir = new ZipPath(this, new byte[]{'/'}); >> >

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread David Beaumont
On Fri, 16 May 2025 14:37:28 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changes based on review feedback. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 241: > >> 23

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread David Beaumont
> Adding read-only support to ZipFileSystem. > > The new `accessMode` environment property allows for readOnly and readWrite > values, and ensures that the requested mode is consistent with what's > returned. > > This involved a little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 11:41:16 GMT, David Beaumont wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 114: >> >>> 112: private final ZipPath rootdir; >>> 113: // Starts in readOnly (safe mode), but might be reset at the end >>> of initialization. >>> 114: priv

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v4]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:22:11 GMT, Jaikiran Pai wrote: >> ""would this change now have a chance of introducing a >> ReadOnlyFileSystemException when constructing the ZipFileSystem whereas >> before it wouldn't?"" >> >> If there was ever a "ReadOnlyFileSystemException" when initializing the >>

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v3]

2025-05-19 Thread Jaikiran Pai
On Thu, 15 May 2025 17:27:42 GMT, David Beaumont wrote: >> src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 167: >> >>> 165: return null; >>> 166: } >>> 167: case String label when READ_WRITE.label.equals(label) >>> -> { >> >

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 12 May 2025 10:01:05 GMT, David Beaumont wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixed test. > > test/jdk/jdk/nio/zipfs/Utils.java line 52: > >> 50: */ >> 51: static Path createJarFile(S

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 12:15:38 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8357081: Removed unused methods of HexDigits

2025-05-19 Thread Shaojin Wen
On Thu, 15 May 2025 22:03:22 GMT, Shaojin Wen wrote: > In HexDigits, getCharsLatin1 and getCharsUTF16 are no longer used, so remove > these methods The getCharsLatin1/getCharsUTF16 methods of HexDigits may be used in j.u.Formatter/HexFormat in the future. For this reason, should we keep them?

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread David Beaumont
On Mon, 19 May 2025 12:39:22 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixed test. > > src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java line 210: > >> 208: } >> 20

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v7]

2025-05-19 Thread David Beaumont
> Adding read-only support to ZipFileSystem. > > The new `accessMode` environment property allows for readOnly and readWrite > values, and ensures that the requested mode is consistent with what's > returned. > > This involved a little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v17]

2025-05-19 Thread Vicente Romero
> This PR is defining a new internal annotation, > `@jdk.internal.RequiresIdentity`, with target types PARAMETER and > TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation > that an argument to a given method or constructor parameter will be an object > with a unique ident

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread David Beaumont
On Mon, 19 May 2025 12:58:00 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixed test. > > test/jdk/jdk/nio/zipfs/NewFileSystemTests.java line 239: > >> 237: assertTrue(fs.isReadO

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 13:35:37 GMT, Jaikiran Pai wrote: > Did I misread something? I missed the fact that for a multi-release JAR file, we mark the file system as read-only, only if the `multi-release` or the `releaseVersion` environment properties have been set. So in this test here, the file s

Re: Towards a JSON API for the JDK

2025-05-19 Thread Cay Horstmann
Il 19/05/25 10:13, Remi Forax ha scritto: If only there was some deconstruction magic that approximates the JavaScript code const doc = { name: "John", age: 30 } const { name, age } = doc We already have that, it's called a record :) Basically, you are advocating for a mapping JsonObject <-->

RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562

2025-05-19 Thread kieran-farrell
With the recent approval of UUIDv7 (https://datatracker.ietf.org/doc/rfc9562/), this PR aims to add a new static method UUID.timestampUUID() which constructs and returns a UUID in support of the new time generated UUID version. The specification requires embedding the current timestamp in milli

ClassLoader.definePackage() throwing IllegalArgumentException

2025-05-19 Thread Robert Stupp
Hi, I'd like to follow up on https://bugs.openjdk.org/browse/JDK-8350547. TL;DR java.lang.ClassLoader.definePackage() (the one taking 8 arguments) clearly defines that a IllegalArgumentException is thrown, "if a package of the given name is already defined by this class loader". However, it

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v18]

2025-05-19 Thread Vicente Romero
> This PR is defining a new internal annotation, > `@jdk.internal.RequiresIdentity`, with target types PARAMETER and > TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation > that an argument to a given method or constructor parameter will be an object > with a unique ident

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v8]

2025-05-19 Thread David Beaumont
> Adding read-only support to ZipFileSystem. > > The new `accessMode` environment property allows for readOnly and readWrite > values, and ensures that the requested mode is consistent with what's > returned. > > This involved a little refactoring to ensure that "read only" state was set > ini

Re: Towards a JSON API for the JDK

2025-05-19 Thread forax
- Original Message - > From: "cay horstmann" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Monday, May 19, 2025 4:12:55 PM > Subject: Re: Towards a JSON API for the JDK > Il 19/05/25 10:13, Remi Forax ha scritto: >>> If only there was some deconstruction magic that approximates the J

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-19 Thread Archie Cobbs
On Mon, 19 May 2025 07:25:17 GMT, Tagir F. Valeev wrote: > I'm not sure whether we should specify exactly the behavior in case if the > comparator returns 0. I feel that it could be a useful invariant that > `Comparator.min(a, b)` and `Comparator.max(a, b)` always return different > argument,

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v5]

2025-05-19 Thread David Beaumont
> Adding read-only support to ZipFileSystem. > > The new `accessMode` environment property allows for readOnly and readWrite > values, and ensures that the requested mode is consistent with what's > returned. > > This involved a little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v8]

2025-05-19 Thread Raffaello Giulietti
On Fri, 16 May 2025 11:10:12 GMT, fabioromano1 wrote: >> Some changes in `Biginteger`s' bit operations that increase the code >> readability and slightly optimize the execution time. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v8]

2025-05-19 Thread Raffaello Giulietti
On Mon, 19 May 2025 15:02:57 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> An optimization > > src/java.base/share/classes/java/math/BigInteger.java line 5034: > >> 5032: */ >> 503

Re: Towards a JSON API for the JDK

2025-05-19 Thread Remi Forax
Okay, i've taken a look to the design and this is not pretty. The main issue is that the javadoc claims that "Both JsonValue instances and their underlying values are immutable." but at the same time any subtypes of JsonValue is non-sealed so anyone can implement let say JsonString and adds i

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v9]

2025-05-19 Thread David Beaumont
> Adding read-only support to ZipFileSystem. > > The new `accessMode` environment property allows for readOnly and readWrite > values, and ensures that the requested mode is consistent with what's > returned. > > This involved a little refactoring to ensure that "read only" state was set > ini

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v8]

2025-05-19 Thread fabioromano1
On Mon, 19 May 2025 15:03:51 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 5034: >> >>> 5032: */ >>> 5033: private byte[] magSerializedForm() { >>> 5034: byte[] result = new byte[(magBitLength() + 7) >>> 3]; >> >> I think there's

Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-19 Thread Brian Burkhalter
On Fri, 16 May 2025 17:22:14 GMT, Brian Burkhalter wrote: >> I guess collapsing the tests made them more ambiguous. Will fix. > > Split the test method in half for Unix and Windows in > [fa2273e](https://github.com/openjdk/jdk/pull/24977/commits/fa2273eded040a22c1e32ba8870571d3a7daf427). > The

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux)

2025-05-19 Thread Roger Riggs
On Sat, 17 May 2025 06:49:37 GMT, Thomas Stuefe wrote: > For the ratio behind this please see the companion CSR: > https://bugs.openjdk.org/browse/JDK-8357180. > > We plan to deprecate this in JDK 25 and to remove it in JDK 26. > > This patch just writes a deprecation message to stderr: > >

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-19 Thread Raffaello Giulietti
On Fri, 16 May 2025 13:30:01 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 3860: >> >>> 3858: && Integer.lowestOneBit(mag[0]) == mag[0] >>> 3859: && numberOfTrailingZeroInts() == mag.length - 1 >>> 3860: ? magBi

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v9]

2025-05-19 Thread fabioromano1
> Some changes in `Biginteger`s' bit operations that increase the code > readability and slightly optimize the execution time. fabioromano1 has updated the pull request incrementally with one additional commit since the last revision: Removed numberOfTrailingZeros() as a duplicate of the cach

Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 15:20:25 GMT, Brian Burkhalter wrote: >> Split the test method in half for Unix and Windows in >> [fa2273e](https://github.com/openjdk/jdk/pull/24977/commits/fa2273eded040a22c1e32ba8870571d3a7daf427). > >> The behavior and system property is Windows specific and might make th

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux)

2025-05-19 Thread Alan Bateman
On Sat, 17 May 2025 06:49:37 GMT, Thomas Stuefe wrote: > For the ratio behind this please see the companion CSR: > https://bugs.openjdk.org/browse/JDK-8357180. > > We plan to deprecate this in JDK 25 and to remove it in JDK 26. > > This patch just writes a deprecation message to stderr: > >

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v18]

2025-05-19 Thread Jan Lahoda
On Mon, 19 May 2025 14:35:40 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Nizar Benalla
Please review this patch to fix some `javadoc` bugs in `java.base`. Certain `@link` tags used to refer to private fields instead of public APIs. A couple of `@see` tags in the [serialization page](https://download.java.net/java/early_access/jdk25/docs/api/serialized-form.html#java.lang.invoke.Met

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread ExE Boss
On Sun, 18 May 2025 02:17:46 GMT, Chen Liang wrote: >> Please review this patch to fix some `javadoc` bugs in `java.base`. >> Certain `@link` tags used to refer to private fields instead of public APIs. >> >> A couple of `@see` tags in the [serialization >> page](https://download.java.net/java/

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Nizar Benalla
On Sun, 18 May 2025 02:18:24 GMT, Chen Liang wrote: >> Please review this patch to fix some `javadoc` bugs in `java.base`. >> Certain `@link` tags used to refer to private fields instead of public APIs. >> >> A couple of `@see` tags in the [serialization >> page](https://download.java.net/java/

Re: RFR: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-19 Thread Chen Liang
On Sat, 17 May 2025 19:42:39 GMT, Nizar Benalla wrote: > Please review this patch to fix some `javadoc` bugs in `java.base`. > Certain `@link` tags used to refer to private fields instead of public APIs. > > A couple of `@see` tags in the [serialization > page](https://download.java.net/java/ea

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread Jaikiran Pai
On Mon, 19 May 2025 13:31:04 GMT, David Beaumont wrote: >> test/jdk/jdk/nio/zipfs/NewFileSystemTests.java line 208: >> >>> 206: // Multi-release JARs, when opened with a specified version >>> are inherently read-only. >>> 207: Path multiReleaseJar = createMultiReleaseJar(); >>>

Withdrawn: 8349545: ClassLoader.definePackage() throws IllegalArgumentException if package already defined

2025-05-19 Thread duke
On Sun, 23 Feb 2025 11:32:41 GMT, Robert Stupp wrote: > Concurent calls to `ClassLoader.definePackage()` can yield > `IllegalArgumentException`s if the package is already defined. Some built-in > class loaders, like `URLClassLoader`, already handle this case, but custom > class loaders (would)

Integrated: 8357106: Add missing classpath exception copyright headers

2025-05-19 Thread Sorna Sarathi N
On Fri, 16 May 2025 07:04:04 GMT, Sorna Sarathi N wrote: > This PR adds missing classpath exception This pull request has now been integrated. Changeset: afcaf840 Author:Sorna Sarathi N Committer: Jaikiran Pai URL: https://git.openjdk.org/jdk/commit/afcaf84022f165d66068c16460b7666f

Re: RFR: 8357178: Simplify Class::componentType [v2]

2025-05-19 Thread Joe Darcy
On Sun, 18 May 2025 21:15:21 GMT, Chen Liang wrote: > > Did you consider calling getComponentType(), which already returns the > > field? > > I don't think we want an extra indirection here - The logic here is quite > simple. Counterargument could be that `MethodType::descriptorString` calls

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v6]

2025-05-19 Thread David Beaumont
On Mon, 19 May 2025 12:54:37 GMT, Jaikiran Pai wrote: >> David Beaumont has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixed test. > > test/jdk/jdk/nio/zipfs/NewFileSystemTests.java line 224: > >> 222: // Underlying file is rea

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v9]

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 15:18:12 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Re: RFR: 8350880: (zipfs) Add support for read-only zip file systems [v9]

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 15:18:12 GMT, David Beaumont wrote: >> Adding read-only support to ZipFileSystem. >> >> The new `accessMode` environment property allows for readOnly and readWrite >> values, and ensures that the requested mode is consistent with what's >> returned. >> >> This involved a l

Integrated: 8351230: Collections.synchronizedList returns a list that is not thread-safe

2025-05-19 Thread Stuart Marks
On Thu, 1 May 2025 19:05:50 GMT, Stuart Marks wrote: > Collections.synchronizedList() returns a List implementation that doesn't do > proper locking. This PR does the following on the synchronized wrapper: > > - overrides and adds locking to SequencedCollection methods; > - performs instance ma

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-19 Thread Thomas Stuefe
> For the ratio behind this please see the companion CSR: > https://bugs.openjdk.org/browse/JDK-8357180. > > We plan to deprecate this in JDK 25 and to remove it in JDK 26. > > This patch just writes a deprecation message to stderr: > > > 08:46:38 thomas@starfish java -Djdk.lang.Process.launch

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-19 Thread Thomas Stuefe
On Mon, 19 May 2025 15:58:17 GMT, Alan Bateman wrote: >> Thomas Stuefe has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use string block > > src/java.base/unix/classes/java/lang/ProcessImpl.java line 111: > >> 109:

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-19 Thread Raffaello Giulietti
On Mon, 19 May 2025 07:25:17 GMT, Tagir F. Valeev wrote: > Implementation of Comparator.min and Comparator.max methods. Preliminary > discussion is in this thread: > https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html > The specification is mostly composed of Math.min/max and C

Re: RFR: 8355954: File.delete removes read-only files (win) [v4]

2025-05-19 Thread Brian Burkhalter
On Mon, 19 May 2025 15:57:14 GMT, Alan Bateman wrote: > I think that would be simpler and means the `@EnabledOnOs` usages would go > away, but it's up to you. I agree that is better. So changed in [74e1698](https://github.com/openjdk/jdk/pull/24977/commits/74e16983c94d9b29c91b660e8a025388d72ae

Re: RFR: 8355954: File.delete removes read-only files (win) [v7]

2025-05-19 Thread Brian Burkhalter
> This change proposes to modify `java.io.File.delete()` so that regular files > on Windows will not be deleted by default if their read-only attribute is > set. A boolean-valued system compatibility property > `jdk.io.File.deleteReadOnly` is defined to reinstate legacy behavior if > desired.

Re: Towards a JSON API for the JDK

2025-05-19 Thread Johannes Döbler
Developers use JSON libraries like Fastjson, Jackson and Gson primarily (my claim) because they can marshal between JSON files and POJOs in one line of code with great performance and can easily tweak the mapping using annotations or adapter classes. Being able to read/write a JSON file from/to

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 16:59:06 GMT, Thomas Stuefe wrote: >> For the ratio behind this please see the companion CSR: >> https://bugs.openjdk.org/browse/JDK-8357180. >> >> We plan to deprecate this in JDK 25 and to remove it in JDK 26. >> >> This patch just writes a deprecation message to stderr:

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-19 Thread fabioromano1
On Mon, 19 May 2025 15:50:10 GMT, Raffaello Giulietti wrote: >> What is the usefulness of doing `int[] mag = this.mag;` at line 3856, since >> `bitLength()` does not access to `static` fields and `BigInteger` is not >> threadsafe, and therefore no race conditions occur? > > I think the suggest

Re: ClassLoader.definePackage() throwing IllegalArgumentException

2025-05-19 Thread Alan Bateman
On 19/05/2025 15:34, Robert Stupp wrote: Hi, I'd like to follow up on https://bugs.openjdk.org/browse/JDK-8350547. TL;DR java.lang.ClassLoader.definePackage() (the one taking 8 arguments) clearly defines that a IllegalArgumentException is thrown, "if a package of the given name is already

Re: RFR: 8355954: File.delete removes read-only files (win) [v7]

2025-05-19 Thread Alan Bateman
On Mon, 19 May 2025 17:10:50 GMT, Brian Burkhalter wrote: >> This change proposes to modify `java.io.File.delete()` so that regular files >> on Windows will not be deleted by default if their read-only attribute is >> set. A boolean-valued system compatibility property >> `jdk.io.File.deleteRe

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 07:25:17 GMT, Tagir F. Valeev wrote: > Implementation of Comparator.min and Comparator.max methods. Preliminary > discussion is in this thread: > https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html > The specification is mostly composed of Math.min/max and C

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-19 Thread Raffaello Giulietti
On Mon, 19 May 2025 17:16:58 GMT, fabioromano1 wrote: >> I think the suggestion is fine. > > Yes, but perhaps in the current version it's more clear what is the returned > value according to the condition. One could see the suggested variant as "return magBitLength(), except for a corrective t

Re: RFR: 8356891: Some code simplifications for basic BigIntegers' bit operations [v6]

2025-05-19 Thread fabioromano1
On Mon, 19 May 2025 17:34:16 GMT, Raffaello Giulietti wrote: >> Yes, but perhaps in the current version it's more clear what is the returned >> value according to the condition. > > One could see the suggested variant as "return magBitLength(), except for a > corrective term in case blah blah.

  1   2   >