Re: RFR: 8352926: New test TestDockerMemoryMetricsSubgroup.java fails [v5]

2025-05-20 Thread PAWAN CHAWDHARY
On Thu, 15 May 2025 16:21:56 GMT, Leonid Mesnik wrote: >> PAWAN CHAWDHARY has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unused import > > test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java line 73: > >> 71:

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-20 Thread Justin Lu
On Tue, 20 May 2025 21:57:45 GMT, Naoto Sato wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, some platforms allow >> diff

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v3]

2025-05-20 Thread Kim Barrett
On Wed, 21 May 2025 02:36:16 GMT, Kim Barrett wrote: >> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage >> native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences >> and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to >>

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close()

2025-05-20 Thread Thomas Stuefe
On Mon, 19 May 2025 12:23:07 GMT, Thomas Stuefe wrote: > Hi, please consider the following patch. > > This patch replaces the existing close-file-descriptors-logic we follow > before exec'ing a target binary: instead of explicitly closing the file > descriptors, we mark them as CLOEXEC. That s

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

2025-05-20 Thread Thomas Stuefe
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: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-20 Thread Thomas Stuefe
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: Towards a JSON API for the JDK

2025-05-20 Thread David Vidal Escudero
Hello, So, if such a Json library is added to the JDK, the Java Http module now should accept a JsonDocument implementing something like BodyPublishers.ofJsonDocument, or better yet BodyPublishers.ofJsonEncodable (assuming Eteh proposal). I think also JDBC API should be modified so prepared state

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v3]

2025-05-20 Thread Alexander Matveev
> Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK bundle contains all files as JDK bundle + > "Contents/_CodeSi

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexey Semenyuk
On Wed, 21 May 2025 02:19:31 GMT, Alexander Matveev wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Sign

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
On Wed, 21 May 2025 02:19:31 GMT, Alexander Matveev wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Sign

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-05-20 Thread Kim Barrett
On Mon, 19 May 2025 19:16:14 GMT, Roger Riggs wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> move jdk.internal.nio.Cleaner to sun.nio > > src/java.base/share/classes/java/nio/BufferCleaner.java line 33: > >> 31: i

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v3]

2025-05-20 Thread Kim Barrett
> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage > native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences > and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to > use java.lang.ref.Cleaner. > > This change is algorithmica

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexey Semenyuk
On Wed, 21 May 2025 01:44:48 GMT, Alexander Matveev wrote: >> src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java >> line 199: >> >>> 197: } >>> 198: return version; >>> 199: }, >> >> I guess, this is a

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
> Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK bundle contains all files as JDK bundle + > "Contents/_CodeSi

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]

2025-05-20 Thread Alexander Matveev
On Wed, 21 May 2025 01:39:16 GMT, Alexey Semenyuk wrote: >> Test cases are added. > > Can you give a reference to a test that expects jpackage to fail with > `message.runtime-image-invalid` error in the output? I can't find it. I just push it. See ErrorTest.java. - PR Review Comme

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Wed, 21 May 2025 01:24:16 GMT, Alexander Matveev wrote: >> src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/MacResources.properties >> line 88: >> >>> 86: message.codesign.failed.reason.xcode.tools=Possible reason for >>> "codesign" failure is missing Xcode with command line

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 17:05:55 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:57:34 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 17:00:21 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:39:02 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexander Matveev
On Tue, 20 May 2025 16:35:57 GMT, Alexey Semenyuk wrote: >> Fixed jpackage to produce valid Java runtimes based on description below: >> >> Definitions: >> >> - JDK bundle defined as bundle which contains "Contents/Home", >> "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". >> - Signed

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v8]

2025-05-20 Thread Shaojin Wen
> Improve the performance of UUID::toString by using Long.expand and SWAR (SIMD > within a register) instead of table lookup. Eliminating the table lookup can > also avoid the performance degradation problem when the cache misses. Shaojin Wen has updated the pull request incrementally with one a

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v7]

2025-05-20 Thread Shaojin Wen
> Improve the performance of UUID::toString by using Long.expand and SWAR (SIMD > within a register) instead of table lookup. Eliminating the table lookup can > also avoid the performance degradation problem when the cache misses. Shaojin Wen has updated the pull request incrementally with two a

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Johannes Graham
On Mon, 19 May 2025 23:53:07 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Johannes Graham
On Mon, 19 May 2025 23:53:07 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Johannes Graham
On Mon, 19 May 2025 23:53:07 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Johannes Graham
On Tue, 20 May 2025 21:53:21 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/util/UUID.java line 528: >> >>> 526: * >>> 527: * Input: 0x0123456789ABCDEF >>> 528: * Output: 0x3031323334353637 ('0','1','2','3','4','5','6','7' in >>> ASCII) >> >> Only the low 32 bits

Re: RFR: 8357275: Locale.Builder.setLanguageTag should mention conversions made on language tag [v2]

2025-05-20 Thread Naoto Sato
On Tue, 20 May 2025 17:19:32 GMT, Justin Lu wrote: >> It is not clear that `Locale.Builder.setLanguageTag(String)` accepts >> _extlang_ subtags in the input as well as what behavior occurs. >> Additionally, both this method and `Locale.forLanguageTag(String)` should >> mention their behavior w

Re: RFR: 8357275: Locale.Builder.setLanguageTag should mention conversions made on language tag [v2]

2025-05-20 Thread Justin Lu
On Tue, 20 May 2025 23:02:45 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> setLanguageTag should mention all conversions, not just extlang > > src/java.base/share/classes/java/util/Locale.java line 1

Re: RFR: 8357275: Locale.Builder.setLanguageTag should mention conversions made on language tag [v3]

2025-05-20 Thread Justin Lu
> It is not clear that `Locale.Builder.setLanguageTag(String)` accepts > _extlang_ subtags in the input as well as what behavior occurs. Additionally, > both this method and `Locale.forLanguageTag(String)` should mention their > behavior when more than three _extlang_ subtags are provided. This

Re: RFR: 8354799: ZipInputStream doesn't verify CRC for ZIP entry with empty file data [v3]

2025-05-20 Thread Shaojin Wen
On Mon, 12 May 2025 11:27:35 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses the issue noted in >> https://bugs.openjdk.org/browse/JDK-8354799? >> >> `java.util.zip.ZipInputStream` when dealing with a `STORED` entry of zero >> size was missing a CRC check f

Re: RFR: 8352565: Add native method implementation of Reference.get() [v6]

2025-05-20 Thread Kim Barrett
On Tue, 20 May 2025 18:43:16 GMT, Vladimir Ivanov wrote: >> Kim Barrett 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 10 additional >> commits

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-20 Thread Naoto Sato
On Tue, 20 May 2025 11:29:42 GMT, Volkan Yazici wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflects review comments > > test/jdk/java/io/Console/StdinEncodingTest.java line 46: > >> 44: * @run junit StdinEncod

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-20 Thread Naoto Sato
On Tue, 20 May 2025 19:24:16 GMT, Volkan Yazici wrote: >> Also noticed `DumbTerminalProvider::sysTerminal` calls `DumbTerminal` with >> `new FileInputStream(FileDescriptor.in)`. Later on `DumbTerminal` applies >> `encoding()` both for passed `stdin` and `std{out,err}`. In short, >> `TerminalPr

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Henry Jen
On Tue, 20 May 2025 18:30:46 GMT, Lance Andersen wrote: >> We report all issues, not just one, so that would also involve what do we >> prioritized for the exit code... >> In general, a non-zero code for invalid jar needs attention. We still 0 with >> unmatched order. >> Also the process could

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-20 Thread Naoto Sato
> `java.io.Console` uses the charset specified by the `stdout.encoding` system > property for both input and output. While this is generally sufficient, since > Console is intended for interactive terminal use, some platforms allow > different encodings to be configured for input and output. In

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Shaojin Wen
On Tue, 20 May 2025 19:51:14 GMT, Roger Riggs wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> hex8 comments > > src/java.base/share/classes/java/util/UUID.java line 528: > >> 526: * >> 527: * Input: 0x0

Re: RFR: 8356891: Some code simplifications in BigInteger [v19]

2025-05-20 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: Simplify two's complement in makePositive(int[])

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

2025-05-20 Thread Philippe Marschall
On Tue, 20 May 2025 19:32:54 GMT, Roger Riggs wrote: >>> This could remove the allocation by composing the high and low longs using >>> shifts and binary operations and ng.next(). >> >> do you mean to create the UUID using most and least significant bytes? if >> so, I've tried out some variati

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Roger Riggs
On Mon, 19 May 2025 23:53:07 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8355798: Implement JEP 514: Ahead-of-Time Command Line Ergonomics [v11]

2025-05-20 Thread Erik Joelsson
On Tue, 20 May 2025 03:43:39 GMT, Ioi Lam wrote: >> This is the implementation of the draft [JEP: Ahead-of-time Command Line >> Ergonomics](https://bugs.openjdk.org/browse/JDK-8350022) >> >> - Implemented new flag `AOTCacheOutput`, which can be used to create an AOT >> cache using the "one-com

Re: Towards a JSON API for the JDK

2025-05-20 Thread Paul Sandoz
Data binding is a complex feature, even if some examples make it appear simple. Our intention is to explore alignment with the serialization 2.0 effort, when we are ready to so. Hence, I would urge folks to be patience and watch out Brian and Viktor’s Devoxx 2024 talk on the topic. Paul. > On

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

2025-05-20 Thread Philippe Marschall
On Tue, 20 May 2025 17:12:08 GMT, kieran-farrell wrote: >> 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

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

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 13:56:42 GMT, kieran-farrell wrote: >>> Can the sub-microsecond value just be truncated and avoid the expensive >>> divide operation?' >> >> method 3 of secion 6.2 of >> https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters >> states >> >>> start wit

Re: Towards a JSON API for the JDK

2025-05-20 Thread Swaranga Sarma
> It’s a not a goal to solve the dependency problem (a very hard problem!) even in a narrow sense. That was only an example where a data-binding API would be useful - it wasn't a meant to be the only use-case or even a suggestion that it should be solved in the general case. > A potential advanta

Re: RFR: 8352565: Add native method implementation of Reference.get() [v6]

2025-05-20 Thread Vladimir Ivanov
On Fri, 9 May 2025 15:59:38 GMT, Kim Barrett wrote: >> Please review this change which adds a native method providing the >> implementation of Reference::get. Referece::get is an intrinsic candidate, >> so >> this native method implementation is only used when the intrinsic is not. >> >> Curre

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods

2025-05-20 Thread Volkan Yazici
On Tue, 20 May 2025 19:18:43 GMT, Volkan Yazici wrote: >> src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java >> line 160: >> >>> 158: >>> 159: try { >>> 160: Terminal terminal = >>> TerminalBuilder.builder().encoding(outCharset) >>

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods

2025-05-20 Thread Volkan Yazici
On Tue, 20 May 2025 10:40:39 GMT, Volkan Yazici wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, some platforms allow >> d

Re: RFR: 8347027: String replaceAll with Function

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell wrote: > New API to the String.java class - replaceAllMapped(String, > Function) that allows regex based replacement via a user > defined function allowing dynamic replacemnt based on the match. It delegates > to the already existing Pattern.mat

Re: RFR: 8347027: String replaceAll with Function

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell wrote: > New API to the String.java class - replaceAllMapped(String, > Function) that allows regex based replacement via a user > defined function allowing dynamic replacemnt based on the match. It delegates > to the already existing Pattern.mat

Re: Towards a JSON API for the JDK

2025-05-20 Thread Paul Sandoz
JEP 198 will likely be withdrawn and a new JEP will be drafted aligned with the document sent in this email thread. It’s a not a goal to solve the dependency problem (a very hard problem!) even in a narrow sense. A potential advantage that we (the OpenJDK community) can more easily do is devis

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Lance Andersen
On Tue, 20 May 2025 18:14:15 GMT, Henry Jen wrote: >>> I am wondering if we should not explicitly said status code of 1 to be more >>> flexible. s/status code of 1/non-zero status code >> >> Well, now would be a good time to consider say a value of 2 for duplicates, >> 3 for invalid names, etc

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Henry Jen
On Tue, 20 May 2025 18:00:47 GMT, Lance Andersen wrote: >> src/jdk.jartool/share/man/jar.md line 235: >> >>> 233: >>> 234: The jar tool will return a status code of 0 if there were no integrity >>> issues encountered and a >>> 235: status code of 1 an issue was found. When an integrity issue i

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

2025-05-20 Thread Raffaello Giulietti
On Fri, 16 May 2025 10:10:28 GMT, fabioromano1 wrote: >> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you >> please crosscheck? > >> There are problems with the `test/jdk/java/math/BigInteger` tests. Can you >> please crosscheck? > > @rgiulietti It seems there is a s

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

2025-05-20 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: A minor change - Changes: - all: https://g

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Lance Andersen
On Tue, 20 May 2025 16:55:44 GMT, Henry Jen wrote: > I am wondering if we should not explicitly said status code of 1 to be more > flexible. s/status code of 1/non-zero status code Well, now would be a good time to consider say a value of 2 for duplicates, 3 for invalid names, etc...

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

2025-05-20 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: Use bitwise or instead of + in longValue() -

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

2025-05-20 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: Some code simplifications for *ValueExact() -

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

2025-05-20 Thread Brian Burkhalter
On Mon, 19 May 2025 07:15:00 GMT, Alan Bateman wrote: >> Thank you Brian, the updated text for this section looks good to me. Once >> this PR gets integrated, I'll go through the Files.readXXX methods and file >> an issue to have that text simplified too. > > I see this has been changed to "th

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

2025-05-20 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354724: Revert previous commit and remove first comma in the change - Changes: - all: https://git.openjdk.o

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v10]

2025-05-20 Thread Henry Jen
> This PR check the jar file to ensure entries are consistent from the central > directory and local file header. Also check there is no duplicate entry names > that could override the desired content by accident. Henry Jen has updated the pull request incrementally with one additional commit s

Re: Towards a JSON API for the JDK

2025-05-20 Thread Florian Weimer
* Brian Goetz: > But then we discovered that JSON5 also sneaks in some semantics, by > also supporting the exotic numeric values (NaN, infinities, signed > zero), which now has consequences for "what is a number", the numeric > representation, the API for unpacking numeric values, etc. (Having >

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8357275: Locale.Builder.setLanguageTag should explicitly state extlangs are allowed [v2]

2025-05-20 Thread Justin Lu
On Tue, 20 May 2025 00:39:16 GMT, Naoto Sato wrote: >> An exception is thrown when more than three extlang subtags are provided >> (ill-formed). The new wording is when an allowed amount of extlang subtags >> are provided (not ill-formed). For example, >> >> `new Locale.Builder().setLanguageTa

Re: RFR: 8357275: Locale.Builder.setLanguageTag should explicitly state extlangs are allowed [v2]

2025-05-20 Thread Justin Lu
> It is not clear that `Locale.Builder.setLanguageTag(String)` accepts > _extlang_ subtags in the input as well as what behavior occurs. Additionally, > both this method and `Locale.forLanguageTag(String)` should mention their > behavior when more than three _extlang_ subtags are provided. This

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

2025-05-20 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: Simplify two's complement in makePositive(int[])

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

2025-05-20 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 times

RFR: 8347027: String replaceAll with Function

2025-05-20 Thread kieran-farrell
New API to the String.java class - replaceAllMapped(String, Function) that allows regex based replacement via a user defined function allowing dynamic replacemnt based on the match. It delegates to the already existing Pattern.matcher().replaceAll(Function). - Commit messages: - w

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Henry Jen
On Sat, 17 May 2025 01:27:38 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8356128: Correct documentation for --linux-package-deps

2025-05-20 Thread Alexey Semenyuk
On Fri, 14 Feb 2025 15:01:35 GMT, Stefan Lobbenmeier wrote: > The documentation suggests that --linux-package-deps is a boolean option, > while in fact it is a string option with dependencies separated by comma and > space > > You can tell that this option is supposed to have an argument here:

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

2025-05-20 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: Avoid redundance of stripLeadingZeroInts() -

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles

2025-05-20 Thread Alexey Semenyuk
On Tue, 20 May 2025 00:47:09 GMT, Alexander Matveev wrote: > Fixed jpackage to produce valid Java runtimes based on description below: > > Definitions: > > - JDK bundle defined as bundle which contains "Contents/Home", > "Contents/MacOS/libjli.dylib" and "Contents/Info.plist". > - Signed JDK

Re: RFR: 8357063: Document preconditions for DecimalDigits methods [v4]

2025-05-20 Thread Shaojin Wen
On Tue, 20 May 2025 15:53:34 GMT, Jaikiran Pai wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> warning > > src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 348: > >> 346: */ >> 347: pu

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

2025-05-20 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: Small code simplifications - Changes: - al

Re: RFR: 8345431: Improve jar --validate to detect duplicate or invalid entries [v9]

2025-05-20 Thread Lance Andersen
On Sat, 17 May 2025 01:27:38 GMT, Henry Jen wrote: >> This PR check the jar file to ensure entries are consistent from the central >> directory and local file header. Also check there is no duplicate entry >> names that could override the desired content by accident. > > Henry Jen has updated t

Re: RFR: 8357063: Document preconditions for DecimalDigits methods [v4]

2025-05-20 Thread Jaikiran Pai
On Fri, 16 May 2025 16:10:29 GMT, Shaojin Wen wrote: >> Similar to PR #24982 >> Document preconditions on certain DecimalDigits methods that use operations >> either unsafe and/or without range checks. > > Shaojin Wen has updated the pull request incrementally with one additional > commit sinc

Integrated: 8355954: File.delete removes read-only files (win)

2025-05-20 Thread Brian Burkhalter
On Wed, 30 Apr 2025 23:38:02 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.deleteReadOn

Re: Towards a JSON API for the JDK

2025-05-20 Thread Paul Sandoz
I think I see what you mean, although to me the general characterization as construction/deconstruction is too narrow - there are a zillion ways to pack-in and pack-out the tree, some partial, and some lossy etc. The canonical pack-in/out is arguably parsing and writing from and to JSON document

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

2025-05-20 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: Revert "Removed redundant code for choosing division's alg

RFR: 8353124: java/lang/Thread/virtual/stress/Skynet.java#Z times out on macosx-x64-debug

2025-05-20 Thread Michael McMahon
Hi, This is a simple test update which increases a timeout from 300s to 400 to account for slow mac os test machines. A repeat 50 test of :jdk_lang passes. I will run this a few more times before pushing, if the change is acceptable. Thanks, Michael - Commit messages: - test upda

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

2025-05-20 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: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 09:32:08 GMT, Kim Barrett wrote: >> src/java.base/share/classes/java/nio/Bits.java line 170: >> >>> 168: // without it that test likely fails. Since failure here >>> 169: // ends in OOME, there's no need to hurry. >>> 170: for (int sleeps

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

2025-05-20 Thread Chen Liang
On Tue, 20 May 2025 06:07:07 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java >> line 47: >> >>> 45: * intrinsics necessary. >>> 46: * >>> 47: * Intrinsification may never happen, or happen at any moment during >>> execution. >> >>

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

2025-05-20 Thread Nizar Benalla
On Mon, 19 May 2025 20:41:13 GMT, Joe Darcy wrote: >> They are documented in [this >> page](https://download.java.net/java/early_access/jdk25/docs/api/serialized-form.html#java.lang.invoke.MethodType) > > Okay -- if there is some link to the private serial-related methods even in a > public jav

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

2025-05-20 Thread Raffaello Giulietti
On Tue, 20 May 2025 13:20:10 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: 8356632: Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

2025-05-20 Thread Daniel Fuchs
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: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v2]

2025-05-20 Thread kieran-farrell
On Tue, 20 May 2025 13:35:32 GMT, kieran-farrell wrote: >> src/java.base/share/classes/java/util/UUID.java line 219: >> >>> 217: randomBytes[8] |= (byte) 0x80; >>> 218: >>> 219: return new UUID(randomBytes); >> >> This could remove the allocation by composing the high and low l

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

2025-05-20 Thread kieran-farrell
On Mon, 19 May 2025 18:17:09 GMT, Roger Riggs wrote: > Can the sub-microsecond value just be truncated and avoid the expensive > divide operation?' method 3 of secion 6.2 of https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters states > start with the portion of the tim

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

2025-05-20 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 redundant code for choosing division's algorithm l

RFR: 8347050: Console.readLine() drops '\' when reading through JLine

2025-05-20 Thread Jan Lahoda
JLine can do history expansion, and interpret escapes, when returning a value. That is not desirable when using JLine as a backend for Console.readLine(). This PR proposes to disable the history expansion. - Commit messages: - Adding bug number - 8347050: Console.readLine() drops

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

2025-05-20 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: Small code simplifications - Changes: - al

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message [v5]

2025-05-20 Thread kerr
> Motivation: > When a user passes a wrong parameter, the current implementation throws an > IllegalArgumentException with an error message `null`, which is not helpful. > > Modification: > Add detail error messages. > > Result: > Helpful messages. He-Pin(kerr) has updated the pull request incr

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

2025-05-20 Thread Andrey Turbanov
On Tue, 20 May 2025 11:58:30 GMT, kieran-farrell wrote: >> 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

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

2025-05-20 Thread kieran-farrell
On Mon, 19 May 2025 18:08:18 GMT, Roger Riggs wrote: >> kieran-farrell has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update RFC > > src/java.base/share/classes/java/util/UUID.java line 195: > >> 193: * >> 194: * @return A {@

  1   2   >