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

2025-06-17 Thread Thomas Schatzl
On Mon, 16 Jun 2025 07:09:39 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. >> >> Curr

RFR: 8359830: Incorrect os.version reported on macOS Tahoe 26 (Beta)

2025-06-17 Thread Jaikiran Pai
Can I please get a review of this change which proposes to address the issue noted in https://bugs.openjdk.org/browse/JDK-8359830? macOS operating system's newer version 26 (currently in Beta) is reported as a 16 by older versions of XCode. JDK internally uses the `NSProcessInfo` and `NSOperati

RFR: 8357739: [jittester] disable the hashCode method

2025-06-17 Thread Evgeny Nikitin
JITTester often uses the `hasCode` method (in fact, in almost every generated test). Given that the method can be unstable between runs or in interpreted vs compiled runs, it can create false-positives. This PR fixes the issue by adding support for method templates similar to the ones used in C

Re: RFR: 8359123: Misleading examples in jmod man page [v4]

2025-06-17 Thread Iris Clark
On Tue, 17 Jun 2025 17:08:17 GMT, Ana Maria Mihalceanu wrote: >> Please review my PR. This PR includes the following: >> >> - [x] Fix a small typo in a word and copyright. >> - [x] Enhance description for `--target-platform`. >> - [x] Rearrange `jmod create` example from basic to complex. > > An

We should convert ERROR_PRIVILEGE_NOT_HELD to AccessDeniedException

2025-06-17 Thread iseki zero
Hello maintainers, When we access a file that requires UAC upgrade on Windows, we will get error code ERROR_PRIVILEGE_NOT_HELD. But the src/java.base/windows/classes/sun/nio/fs/WindowsException.java haven't convert the error code to AccessDeniedException. In 2 years ago I opened a PR on gith

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v7]

2025-06-17 Thread Jaikiran Pai
On Tue, 17 Jun 2025 21:47:49 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8356438: Update OutputAnalyzer to optionally print process output as it happens [v2]

2025-06-17 Thread David Holmes
On Thu, 5 Jun 2025 09:36:37 GMT, Alice Pellegrini wrote: >> The implemented solution modifies the `OutputBuffer` implementation instead >> of the `OutputAnalyzer` implementation. >> This is because the **OutputBuffer implementation which handles processes** >> (LazyOutputBuffer) starts a thread

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Chen Liang
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Xueming Shen
On Wed, 18 Jun 2025 01:34:14 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/Reader.java line 469: >> >>> 467: if (c == '\r' || c == '\n') >>> 468: break; >>> 469: term++; >> >> It might be worth adding a test o

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Shaojin Wen
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Shaojin Wen
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-17 Thread Naoto Sato
On Tue, 17 Jun 2025 23:34:52 GMT, Alisen Chung wrote: >> This issue is responsible for updating the translations of all the >> localize(able) resources in the JDK since the previous L10n drop. > > Alisen Chung has updated the pull request incrementally with one additional > commit since the las

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Brian Burkhalter
On Wed, 18 Jun 2025 00:53:51 GMT, Roger Riggs wrote: >> Replaces the implementation `readAllCharsAsString().lines().toList()` with >> reading into a temporary `char` array which is then processed to detect line >> terminators and copy non-terminating characters into strings which are added >>

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Roger Riggs
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Brian Burkhalter
Replaces the implementation `readAllCharsAsString().lines().toList()` with reading into a temporary `char` array which is then processed to detect line terminators and copy non-terminating characters into strings which are added to the list. - Commit messages: - 8358533: Improve p

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Brian Burkhalter
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-17 Thread Alexander Matveev
On Tue, 17 Jun 2025 23:34:52 GMT, Alisen Chung wrote: >> This issue is responsible for updating the translations of all the >> localize(able) resources in the JDK since the previous L10n drop. > > Alisen Chung has updated the pull request incrementally with one additional > commit since the las

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-17 Thread Alisen Chung
> This issue is responsible for updating the translations of all the > localize(able) resources in the JDK since the previous L10n drop. Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fix unicode escapes - Changes: -

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update

2025-06-17 Thread Justin Lu
On Tue, 17 Jun 2025 01:22:31 GMT, Alisen Chung wrote: > This issue is responsible for updating the translations of all the > localize(able) resources in the JDK since the previous L10n drop. src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_de.properties line 30: > 28:

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update

2025-06-17 Thread Alisen Chung
On Tue, 17 Jun 2025 01:22:31 GMT, Alisen Chung wrote: > This issue is responsible for updating the translations of all the > localize(able) resources in the JDK since the previous L10n drop. whitespace changes are fixed, PR is ready for review - PR Comment: https://git.openjdk.org

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update

2025-06-17 Thread Justin Lu
On Tue, 17 Jun 2025 01:22:31 GMT, Alisen Chung wrote: > This issue is responsible for updating the translations of all the > localize(able) resources in the JDK since the previous L10n drop. src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/messages_de.properties line 2: > 1: # > 2:

RFR: 8359761: JDK 25 RDP1 L10n resource files update

2025-06-17 Thread Alisen Chung
This issue is responsible for updating the translations of all the localize(able) resources in the JDK since the previous L10n drop. - Commit messages: - empty commit - redo ws fixes, add manual changes Changes: https://git.openjdk.org/jdk/pull/25839/files Webrev: https://webrev

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]

2025-06-17 Thread Justin Lu
On Tue, 17 Jun 2025 08:16:15 GMT, Johannes Döbler wrote: > I am still wondering what this (old) test tries to proof. It is filed below > jdk.onternal.loader.URLClassPath but doesn't use or test URLClassPath, and it > succeeds to construct a Class with an invalid name "fo o". URLClassPath is us

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v7]

2025-06-17 Thread Justin Lu
> Please review this PR which finishes Applet removal for the test: > jdk/internal/loader/URLClassPath/ClassnameCharTest.java. > > `testclasses.jar` is updated such that the two classes no longer extend > Applet. > > > $ javap fo\ o.class > public class fo o { > } > $ javap æ$'\302\211'$'\302

Re: [jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bei

[jdk25] Integrated: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bei

RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty`

2025-06-17 Thread Naoto Sato
Refactored the internal handling of `stdin/out/err.encoding` to allow setting them only via command-line options by converting them into `StaticProperty`. This change prevents unexpected behavior caused by applications modifying these properties at runtime using `System.setProperty()`.

Re: RFR: 8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils

2025-06-17 Thread duke
On Mon, 16 Jun 2025 22:49:02 GMT, Vladimir Petko wrote: > To accommodate systems like Ubuntu 25.10 that use Rust coreutils, this PR > updates tests that previously assumed BusyBox was the only environment to use > symlinks for core utilities. > > Changes: > - `java/lang/ProcessBuilder/Basic.

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

2025-06-17 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

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

2025-06-17 Thread Thomas Stuefe
On Tue, 17 Jun 2025 05:56:15 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. T

Re: [jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Chen Liang
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bei

Integrated: 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test

2025-06-17 Thread Dermot Boyle
On Tue, 17 Jun 2025 14:56:59 GMT, Dermot Boyle wrote: > … extract method for Windows specific test This pull request has now been integrated. Changeset: 49a82d88 Author:dermster Committer: Mark Sheppard URL: https://git.openjdk.org/jdk/commit/49a82d880636a632f4a3471b14b1b1b29ce1d5e

Re: RFR: 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test

2025-06-17 Thread duke
On Tue, 17 Jun 2025 14:56:59 GMT, Dermot Boyle wrote: > … extract method for Windows specific test @dermotb Your change (at version 9f0647e6d7176c36e3acf93a4256d102f0867e0a) is now ready to be sponsored by a Committer. - PR Comment: https://git.openjdk.org/jdk/pull/25853#issuecom

Re: RFR: 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test

2025-06-17 Thread Brian Burkhalter
On Tue, 17 Jun 2025 14:56:59 GMT, Dermot Boyle wrote: > … extract method for Windows specific test Looks fine. - Marked as reviewed by bpb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25853#pullrequestreview-2936585934

RFR: 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test

2025-06-17 Thread Dermot Boyle
… extract method for Windows specific test - Commit messages: - Removed more whitespace for JCheck - Removed whitespace for JCheck - JDK-8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test Changes: https://git.openjdk.org/jdk

Re: [jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Brian Burkhalter
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bei

Re: RFR: 8356438: Update OutputAnalyzer to optionally print process output as it happens [v2]

2025-06-17 Thread Matthew Donovan
On Tue, 10 Jun 2025 07:47:29 GMT, Alice Pellegrini wrote: >> But isn't it the person running the tests that wants to set this, not an >> inherent property of a test itself? Or are you envisaging enabling it at the >> test-level so the person running the tests doesn't have to do so? But then >>

Re: [jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Naoto Sato
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit bei

[jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
Hi all, This pull request contains a backport of commit [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Stuart Marks on 16 Jun 2025 and was rev

Re: RFR: 8359123: Misleading examples in jmod man page [v4]

2025-06-17 Thread Ana Maria Mihalceanu
> Please review my PR. This PR includes the following: > > - [x] Fix a small typo in a word and copyright. > - [x] Enhance description for `--target-platform`. > - [x] Rearrange `jmod create` example from basic to complex. Ana Maria Mihalceanu has updated the pull request incrementally with one

Re: RFR: 8359123: Misleading examples in jmod man page [v3]

2025-06-17 Thread Ana Maria Mihalceanu
On Tue, 17 Jun 2025 16:51:19 GMT, Iris Clark wrote: >> Ana Maria Mihalceanu has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Enhance --target-platform explanation. > > src/jdk.jlink/share/man/jmod.md line 182: > >> 180: >> 181: `--targe

Re: RFR: 8359123: Misleading examples in jmod man page [v3]

2025-06-17 Thread Iris Clark
On Mon, 16 Jun 2025 19:59:06 GMT, Ana Maria Mihalceanu wrote: >> Please review my PR. This PR includes the following: >> >> - [x] Fix a small typo in a word and copyright. >> - [x] Enhance description for `--target-platform`. >> - [x] Rearrange `jmod create` example from basic to complex. > > An

Re: RFR: 8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils

2025-06-17 Thread Roger Riggs
On Mon, 16 Jun 2025 22:49:02 GMT, Vladimir Petko wrote: > To accommodate systems like Ubuntu 25.10 that use Rust coreutils, this PR > updates tests that previously assumed BusyBox was the only environment to use > symlinks for core utilities. > > Changes: > - `java/lang/ProcessBuilder/Basic.

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

2025-06-17 Thread Roger Riggs
On Tue, 17 Jun 2025 05:56:15 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. T

Re: StableValue vs Optional

2025-06-17 Thread Maurizio Cimadamore
On 17/06/2025 16:01, Mickael Istria wrote: On Tue, Jun 17, 2025 at 4:51 PM Maurizio Cimadamore wrote: Maybe I'm misunderstanding... what would be the difference between StableValue::supplier and Supplier::cache ? Is it a discoverability issue you are pointing out (e.g. this

Re: StableValue vs Optional

2025-06-17 Thread Mickael Istria
On Tue, Jun 17, 2025 at 4:51 PM Maurizio Cimadamore < maurizio.cimadam...@oracle.com> wrote: > Maybe I'm misunderstanding... what would be the difference between > StableValue::supplier and Supplier::cache ? > > Is it a discoverability issue you are pointing out (e.g. this factory > would be more

Re: StableValue vs Optional

2025-06-17 Thread Maurizio Cimadamore
On 17/06/2025 15:25, Mickael Istria wrote: (and still believe a Supplier.cache(Supplier computer) would be a nice addition). Maybe I'm misunderstanding... what would be the difference between StableValue::supplier and Supplier::cache ? Is it a discoverability issue you are pointing out (e.g

Re: StableValue vs Optional

2025-06-17 Thread Mickael Istria
On Tue, Jun 17, 2025 at 3:34 PM Maurizio Cimadamore < maurizio.cimadam...@oracle.com> wrote: > Note that this is already part of the StableValue API: > https://download.java.net/java/early_access/jdk25/docs/api/java.base/java/lang/StableValue.html#supplier(java.util.function.Supplier) > Yes, that

Integrated: 8357862: Java argument file is parsed unexpectedly with trailing comment

2025-06-17 Thread Christian Stein
On Mon, 2 Jun 2025 13:46:23 GMT, Christian Stein wrote: > Please review this fix to correctly parse tokens in an argument file that > contains trailing comments without preceding whitespace characters before the > '#' comment marker, the number sign. > > The specifaction of the `java` Command

Re: StableValue vs Optional

2025-06-17 Thread Maurizio Cimadamore
On 17/06/2025 13:55, Mickael Istria wrote: Thanks for your answer. > the most minimalistic type to model that would be a Supplier. Indeed. I mentioned Optional, but as the discussion goes, what could work instead of an Optional would be a constructor `Supplier.cache(Supplier computer)` that

Re: StableValue vs Optional

2025-06-17 Thread Mickael Istria
Thanks for your answer. > the most minimalistic type to model that would be a Supplier. Indeed. I mentioned Optional, but as the discussion goes, what could work instead of an Optional would be a constructor `Supplier.cache(Supplier computer)` that would cache the computed value. That would be ev

Re: Best Practice for Busy Waiting in Java

2025-06-17 Thread Markus KARG
In general, I second do that. The point why I came up with a best practices document is that in many companies the average programmer is not an engineer, and would be happy to have some rules at hand. It must not be perfect, it must be just better than "empty" busy-wait. Am 17.06.2025 um 11:3

Re: StableValue vs Optional

2025-06-17 Thread Maurizio Cimadamore
Hi Mickael, I think at a very high level, a stable value is just a supplier of some value, lazily computed. So, the most minimalistic type to model that would be a Supplier. In fact, this is what the StableValue provides as well (StableValue has a factory that takes a supplier and gives you ba

StableValue vs Optional

2025-06-17 Thread Mickael Istria
Hi all, (I'm new around here, so please excuse me for this late comment or in case this was already discussed in some place I missed; I have seached Jira and the mailing-list via search engine unsuccessfully). I just discovered the StableValue proposal of JEP-502, that's a preview feature for Jav

Re: Best Practice for Busy Waiting in Java

2025-06-17 Thread Viktor Klang
I'll second what Alan said. What I've found to be true, over and over, is that every API needs its own (broad) performance testing, since memory access patterns, instructions-under-critical-section, and differences in scheduling across different platforms all interact. It's worth having a look

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]

2025-06-17 Thread Johannes Döbler
On Mon, 16 Jun 2025 17:30:12 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]

2025-06-17 Thread Johannes Döbler
On Mon, 16 Jun 2025 17:30:12 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.