Re: Request for Enhancement: java.io.Writer.of(Appendable) as an efficient alternative to java.io.StringWriter

2025-05-06 Thread Alan Bateman
On 15/03/2025 17:58, Markus KARG wrote: Chen, thank you for sharing your opinion! Thinking about what you wrote about the "trifecta" complexity, I think it might be better to restart my idea from scratch: As explained in my original proposal (https://mail.openjdk.org/pipermail/core-libs-dev

Re: RFR: 8354260: Launcher help text is wrong for -Xms

2025-05-06 Thread Jan Lahoda
On Tue, 6 May 2025 08:02:21 GMT, Christian Stein wrote: > Please review this update to synchronize the extra help text for `-Xms` with > the description given in the manpage. > > Copied from the issue: >> The launcher help text for -Xms is wrong and should be updated to match the >> manpage de

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

2025-05-06 Thread Alan Bateman
On Wed, 7 May 2025 06:16:53 GMT, Bernd wrote: > Maybe the Release Notes should mention that this does not care for Unix > readonly (I.e. files without Read permissions). The release note will be clear that this is a Windows only change. - PR Comment: https://git.openjdk.org/jdk/pu

Integrated: 8355249: Remove the use of WMIC from the entire source code

2025-05-06 Thread Daishi Tabata
On Tue, 22 Apr 2025 07:29:08 GMT, Daishi Tabata wrote: > After searching the entire JDK source code, I found that WMIC is only used in > four files. These WMIC calls can be replaced with PowerShell for WMI. > > The primary challenge in this replacement is to make it work the same as > before,

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

2025-05-06 Thread Bernd
On Fri, 2 May 2025 18:19:35 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.deleteRea

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

2025-05-06 Thread Alan Bateman
On Fri, 2 May 2025 18:19:35 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.deleteRea

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

2025-05-06 Thread Ioi Lam
On Wed, 7 May 2025 02:33:50 GMT, Ashutosh Mehra wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @vnkozlov comments > > src/hotspot/share/cds/cdsConfig.cpp line 428: > >> 426: >> 427: // At least one AOT flag has bee

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

2025-05-06 Thread Ioi Lam
> 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-command workflow" > - Added processing of the `JAVA_AOT_OPT

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]

2025-05-06 Thread Shaojin Wen
On Tue, 6 May 2025 12:32:38 GMT, Per Minborg wrote: >> As we advance, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a MemorySegment to capture potential error states. This can lead to >> neg

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]

2025-05-06 Thread Shaojin Wen
On Tue, 6 May 2025 12:32:38 GMT, Per Minborg wrote: >> As we advance, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a MemorySegment to capture potential error states. This can lead to >> neg

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]

2025-05-06 Thread Shaojin Wen
On Tue, 6 May 2025 12:32:38 GMT, Per Minborg wrote: >> As we advance, converting older JDK code to use the relatively new FFM API >> requires system calls that can provide `errno` and the likes to explicitly >> allocate a MemorySegment to capture potential error states. This can lead to >> neg

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v3]

2025-05-06 Thread Shaojin Wen
On Tue, 6 May 2025 17:16:32 GMT, Shaojin Wen wrote: >> I have the old switch format in anticipation of faster startup. > > enhanced 'switch' is just syntax sugar and does not affect startup speed I looked at the generated bytecode through javap and confirmed that the enhanced switch is just syn

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

2025-05-06 Thread Ashutosh Mehra
On Mon, 5 May 2025 01:00:31 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-comm

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v4]

2025-05-06 Thread erifan
On Fri, 2 May 2025 06:14:33 GMT, Emanuel Peter wrote: >> src/hotspot/share/opto/vectornode.cpp line 2216: >> >>> 2214: in2->is_predicated_vector()) { >>> 2215: with_predicated = true; >>> 2216: } >> >> Suggestion: >> >> bool with_predicated = is_predicated_vector() || >>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v4]

2025-05-06 Thread erifan
On Fri, 2 May 2025 06:16:03 GMT, Emanuel Peter wrote: >> erifan 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 six additional commits since >>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v3]

2025-05-06 Thread erifan
On Thu, 1 May 2025 07:32:22 GMT, erifan wrote: >> Yes, this discussion is down to `requires` vs `applyIf`. This is my argument >> for `applyIf`, quoted from above, I have not yet seen an argument against it: >> >>> If you use @require, then the person does not realize there is a test AND >>>

Re: RFR: 8354242: VectorAPI: combine vector not operation with compare [v5]

2025-05-06 Thread erifan
> This patch optimizes the following patterns: > For integer types: > > (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) > => (VectorMaskCmp src1 src2 ncond) > (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) > => (VectorMaskCmp src1 src2 ncond) > > cond can be eq, ne, le, ge, l

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v3]

2025-05-06 Thread Alexander Matveev
> - Symbolic links will not be followed for `--app-content` on all platforms. > - Added test to cover this case. > - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, > since "cp -r" on macOS is not documented option and when used `cp` will > follow symbolic links which br

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v2]

2025-05-06 Thread Alexander Matveev
On Wed, 7 May 2025 01:50:31 GMT, Shaojin Wen wrote: >> Alexander Matveev 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 five additional >> comm

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v2]

2025-05-06 Thread Shaojin Wen
On Wed, 7 May 2025 01:34:13 GMT, Alexander Matveev wrote: >> - Symbolic links will not be followed for `--app-content` on all platforms. >> - Added test to cover this case. >> - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, >> since "cp -r" on macOS is not documented

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-05-06 Thread Yi Yang
On Thu, 17 Apr 2025 16:26:59 GMT, Naoto Sato wrote: >>> We will probably need to make sure things are ok on Windows as well (they >>> are the other confusing environment) >> >> Windows is much more painful to work with, since there is no correspondence >> of `LC_ALL`; you must set the user's l

Re: RFR: 8352480: Don't follow symlinks in additional content for app images

2025-05-06 Thread Alexander Matveev
On Wed, 30 Apr 2025 20:56:19 GMT, Alexey Semenyuk wrote: > I don't like the idea of changing behavior on only one platform. It should be > consistent across all platforms. Let's not follow symlinks on other > platforms, either. Fix is updated not to follow links on all platforms. Test is updat

Re: RFR: 8352480: Don't follow symlinks in additional content for app images [v2]

2025-05-06 Thread Alexander Matveev
> - Symbolic links will not be followed for `--app-content` on all platforms. > - Added test to cover this case. > - `MacHelper` updated to use "cp -R" instead of "cp -r" when unpacking DMG, > since "cp -r" on macOS is not documented option and when used `cp` will > follow symbolic links which br

Re: RFR: 8355249: Remove the use of WMIC from the entire source code [v2]

2025-05-06 Thread duke
On Tue, 22 Apr 2025 07:41:43 GMT, Daishi Tabata wrote: >> After searching the entire JDK source code, I found that WMIC is only used >> in four files. These WMIC calls can be replaced with PowerShell for WMI. >> >> The primary challenge in this replacement is to make it work the same as >> bef

Re: RFR: 8355249: Remove the use of WMIC from the entire source code [v2]

2025-05-06 Thread Daishi Tabata
On Tue, 22 Apr 2025 07:41:43 GMT, Daishi Tabata wrote: >> After searching the entire JDK source code, I found that WMIC is only used >> in four files. These WMIC calls can be replaced with PowerShell for WMI. >> >> The primary challenge in this replacement is to make it work the same as >> bef

Integrated: 8356309: Fix issues uncovered after running jpackage tests locally with installing test packages

2025-05-06 Thread Alexey Semenyuk
On Fri, 25 Apr 2025 18:07:50 GMT, Alexey Semenyuk wrote: > Fix issues uncovered in the tests after local test runs with the installation > of test packages: > - LinuxHelper: fix a regression from > [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988). Before the > [JDK-8354988](https://

Re: RFR: 8356309: Fix issues uncovered after running jpackage tests locally with installing test packages

2025-05-06 Thread Alexander Matveev
On Fri, 25 Apr 2025 18:07:50 GMT, Alexey Semenyuk wrote: > Fix issues uncovered in the tests after local test runs with the installation > of test packages: > - LinuxHelper: fix a regression from > [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988). Before the > [JDK-8354988](https://

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v8]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 21:45:55 GMT, Jorn Vernee 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 12 additional >> commits since

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v9]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 22:11:49 GMT, Chen Liang wrote: >> Credit to @lukellmann that the duplication arg handling in #24742 avoided >> throwing exceptions but produced a wrong option. This patch fixes that and >> removed stream usages in CaptureCallState to speed up bootstrap. >> >> Also, the prev

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v9]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 22:11:49 GMT, Chen Liang wrote: >> Credit to @lukellmann that the duplication arg handling in #24742 avoided >> throwing exceptions but produced a wrong option. This patch fixes that and >> removed stream usages in CaptureCallState to speed up bootstrap. >> >> Also, the prev

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v9]

2025-05-06 Thread Chen Liang
> Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous patch affected the toString display of the option; I

Re: RFR: 8353795: Add Writer.of(StringBuilder) [v2]

2025-05-06 Thread Jesper Wilhelmsson
On Sun, 4 May 2025 16:21:41 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8353795](https://bugs.openjdk.org/browse/JDK-8353795): Adding the new >> method `public static Writer Writer.of(StringBuilder)`, providing a >> non-synchronized Writer implementatio

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v8]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 20:07:56 GMT, Chen Liang wrote: >> Credit to @lukellmann that the duplication arg handling in #24742 avoided >> throwing exceptions but produced a wrong option. This patch fixes that and >> removed stream usages in CaptureCallState to speed up bootstrap. >> >> Also, the prev

Re: RFR: 8353686: Optimize Math.cbrt for x86 64 bit platforms [v3]

2025-05-06 Thread Mohamed Issa
> The goal of this PR is to implement an x86_64 intrinsic for > java.lang.Math.cbrt() using libm. > > The results of all tests posted below were captured with an [Intel® Xeon > 6761P](https://www.intel.com/content/www/us/en/products/sku/241842/intel-xeon-6761p-processor-336m-cache-2-50-ghz/speci

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v12]

2025-05-06 Thread Markus KARG
> This Pull Request proposes an implementation for > [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new > method `public void getChars(int srcBegin, int srcEnd, char[] dst, int > dstBegin)` to the `CharSequence` interface, providing a **bulk-read** > facility including a

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v11]

2025-05-06 Thread Markus KARG
On Tue, 6 May 2025 11:23:01 GMT, Markus KARG wrote: > Hello Markus, it's been a while since this PR was merged with latest master > branch in mainline. Could you update the PR to do that? Updated to current `master`. Builds fine locally. Pushed to Github. Github Actions currently are running.

RFR: 8356309: Fix issues uncovered after running jpackage tests locally with installing test packages

2025-05-06 Thread Alexey Semenyuk
Fix issues uncovered in the tests after local test runs with the installation of test packages: - LinuxHelper: fix a regression from [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988). Before the [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988) fix, when a process started wit

Re: RFR: 8356309: Fix issues uncovered after running jpackage tests locally with installing test packages

2025-05-06 Thread Alexey Semenyuk
On Fri, 25 Apr 2025 18:07:50 GMT, Alexey Semenyuk wrote: > Fix issues uncovered in the tests after local test runs with the installation > of test packages: > - LinuxHelper: fix a regression from > [JDK-8354988](https://bugs.openjdk.org/browse/JDK-8354988). Before the > [JDK-8354988](https://

Re: RFR: 8353795: Add Writer.of(StringBuilder) [v2]

2025-05-06 Thread Markus KARG
On Sun, 4 May 2025 16:21:41 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8353795](https://bugs.openjdk.org/browse/JDK-8353795): Adding the new >> method `public static Writer Writer.of(StringBuilder)`, providing a >> non-synchronized Writer implementatio

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v13]

2025-05-06 Thread Brian Burkhalter
> This proposed change would move the native objects required for NIO file > interaction from the libnio native library to the libjava native library on > Linux, macOS, and Windows. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v8]

2025-05-06 Thread Chen Liang
> Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous patch affected the toString display of the option; I

Integrated: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output"

2025-05-06 Thread Brent Christian
On Thu, 20 Mar 2025 22:35:23 GMT, Brent Christian wrote: > I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear > up the intermittent failures: > > * run with `othervm`: this test blocks the (global) finalizer thread, and > also requires the (global) finalizer thread to

Integrated: 8356096: ISO 4217 Amendment 179 Update

2025-05-06 Thread Justin Lu
On Fri, 2 May 2025 20:51:31 GMT, Justin Lu wrote: > Please review this PR which implements ISO 4217 update 179. > > The _Arab Accounting Dinar_ currency is added under an _agency_, (not > _country_) entity. As a result it is not added as an entry in the country to > currency mapping in `curren

Re: RFR: 8356096: ISO 4217 Amendment 179 Update

2025-05-06 Thread Justin Lu
On Fri, 2 May 2025 20:51:31 GMT, Justin Lu wrote: > Please review this PR which implements ISO 4217 update 179. > > The _Arab Accounting Dinar_ currency is added under an _agency_, (not > _country_) entity. As a result it is not added as an entry in the country to > currency mapping in `curren

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v6]

2025-05-06 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: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v7]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 17:40:52 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java >> line 55: >> >>> 53: } else { >>> 54: supported = List.of(new CapturableState("errno", JAVA_INT, >>> 1 << 2)); >>> 55: } >> >> Maybe ju

Re: RFR: 8345431: Detect duplicate entries in jar files with jar --validate [v5]

2025-05-06 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: RFR: 8354968: Replace unicode sequences in comment text with UTF-8 characters [v2]

2025-05-06 Thread Naoto Sato
On Tue, 6 May 2025 17:59:18 GMT, Magnus Ihse Bursie wrote: >> src/java.base/share/classes/java/text/Collator.java line 141: >> >>> 139: * considered significant during comparison. The assignment of >>> strengths >>> 140: * to language features is locale dependent. A common example is

Integrated: 8354273: Replace even more Unicode characters with ASCII

2025-05-06 Thread Magnus Ihse Bursie
On Thu, 10 Apr 2025 10:18:08 GMT, Magnus Ihse Bursie wrote: > As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), > I found some additional places where unicode characters are unnecessarily > used instead of pure ASCII. This pull request has now been integrated. Chan

Re: RFR: 8354968: Replace unicode sequences in comment text with UTF-8 characters [v2]

2025-05-06 Thread Magnus Ihse Bursie
On Tue, 6 May 2025 17:15:34 GMT, Naoto Sato wrote: >> Magnus Ihse Bursie 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 two >> additional commi

Integrated: 8356219: jpackage places libapplauncher.so in incorrect location in the app image

2025-05-06 Thread Alexey Semenyuk
On Mon, 5 May 2025 21:44:36 GMT, Alexey Semenyuk wrote: > - Refactor PathGroup > - Add test cases to PathGroupTest > - Update UsrTreeTest to verify "libapplauncher.so" is placed in the correct > location in the package > - Refactor UsrTreeTest to use JPackageCommand assert functions This pul

Re: RFR: 8356050: Problemlist jdk, langtools & lib-test tier1 tests requiring runtime usages of /bin/tools for static-jdk [v2]

2025-05-06 Thread Jiangli Zhou
On Tue, 6 May 2025 17:47:04 GMT, Magnus Ihse Bursie wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Problemlist jdk/test/lib/hprof/HprofTest. > > Marked as reviewed by ihse (Reviewer). Thanks for reviewing, @magic

Integrated: 8356050: Problemlist jdk, langtools & lib-test tier1 tests requiring runtime usages of /bin/tools for static-jdk

2025-05-06 Thread Jiangli Zhou
On Fri, 2 May 2025 01:15:05 GMT, Jiangli Zhou wrote: > Please review this PR to problemlist jdk & langtools tier1 tests requiring > runtime usages of /bin/tools, for testing on static-jdk. The affected > tests using following tools at runtime: > > - javac > - javadoc > - jar > - jarsigner > -

Re: RFR: 8356050: Problemlist jdk, langtools & lib-test tier1 tests requiring runtime usages of /bin/tools for static-jdk [v2]

2025-05-06 Thread Magnus Ihse Bursie
On Fri, 2 May 2025 17:43:37 GMT, Jiangli Zhou wrote: >> Please review this PR to problemlist jdk & langtools tier1 tests requiring >> runtime usages of /bin/tools, for testing on static-jdk. The affected >> tests using following tools at runtime: >> >> - javac >> - javadoc >> - jar >> - jarsig

Re: RFR: 8356219: jpackage places libapplauncher.so in incorrect location in the app image [v2]

2025-05-06 Thread Alexander Matveev
On Tue, 6 May 2025 03:25:07 GMT, Alexey Semenyuk wrote: >> - Refactor PathGroup >> - Add test cases to PathGroupTest >> - Update UsrTreeTest to verify "libapplauncher.so" is placed in the correct >> location in the package >> - Refactor UsrTreeTest to use JPackageCommand assert functions > >

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v7]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 17:27:09 GMT, Jorn Vernee wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update >> src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java >> >> Co-authored-by: Shaojin Wen

Integrated: 8356152: String.concat can throw StringIndexOutOfBoundsException

2025-05-06 Thread Raffaello Giulietti
On Mon, 5 May 2025 13:07:45 GMT, Raffaello Giulietti wrote: > A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. This pull request has now been integrated. Changeset: 052e2522 Author:Raffaello Giulietti URL: https://git.openjdk.org/jdk/commit/052e2522b661e51b5fd2e0561c486

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v5]

2025-05-06 Thread Raffaello Giulietti
On Mon, 5 May 2025 20:58:56 GMT, Andrey Turbanov wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Increased min heap size to 8G. > > Marked as reviewed by aturbanov (Committer). Thanks to the reviewers, and

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v11]

2025-05-06 Thread Markus KARG
On Thu, 1 May 2025 08:45:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` in

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v7]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 15:51:54 GMT, Chen Liang wrote: >> Credit to @lukellmann that the duplication arg handling in #24742 avoided >> throwing exceptions but produced a wrong option. This patch fixes that and >> removed stream usages in CaptureCallState to speed up bootstrap. >> >> Also, the prev

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-06 Thread Markus KARG
On Sun, 4 May 2025 05:08:46 GMT, Alan Bateman wrote: >> Oh, and we should set `next` afterwards, so the `Reader` knows that the end >> of the sequence is reached: >> >> >> public String readAllChars() throws IOException { >> ensureOpen(); >> var len = cs.length(); >> var remainder

Re: RFR: 8301971: Make JDK source code UTF-8 [v5]

2025-05-06 Thread Erik Joelsson
On Tue, 6 May 2025 15:39:04 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v5]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 15:47:36 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java >> line 81: >> >>> 79: >>> 80: public static CapturableState forName(String name) { >>> 81: var ret = LOOKUP.get(name); >> >> As we usually have just one

Re: RFR: 8354968: Replace unicode sequences in comment text with UTF-8 characters [v2]

2025-05-06 Thread Naoto Sato
On Tue, 6 May 2025 15:46:03 GMT, Magnus Ihse Bursie wrote: >> As part of the UTF-8 cleaning up done in >> [JDK-8301971](https://bugs.openjdk.org/browse/JDK-8301971), I looked at >> where and how we are using unicode sequences (`\u`). In several string >> literals, I think the unicode seque

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v3]

2025-05-06 Thread Shaojin Wen
On Tue, 6 May 2025 12:30:01 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/foreign/CaptureStateUtil.java line >> 390: >> >>> 388: return MhUtil.findVirtual(LOOKUP, Arena.class, "close", >>> 389: MethodType.methodType(void.class)); >>>

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v5]

2025-05-06 Thread Jorn Vernee
On Tue, 6 May 2025 15:46:22 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java >> line 59: >> >>> 57: MemoryLayout[] stateLayouts = new >>> MemoryLayout[supported.size()]; >>> 58: @SuppressWarnings({"unchecked", "rawtypes"}) >>>

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v11]

2025-05-06 Thread Jaikiran Pai
On Tue, 6 May 2025 16:53:07 GMT, Markus KARG wrote: > so my question was only about how to perform the update. Locally, if your remote repo that points to github.com/openjdk/jdk is named `upstream` and the local branch from which you have created this PR is named `getchars`, then you would do

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v11]

2025-05-06 Thread Markus KARG
On Tue, 6 May 2025 11:30:09 GMT, Jaikiran Pai wrote: > > do you mean merging master branch into this branch? > > Yes, that's correct. That should then run the GitHub actions job against this > PR against a more relevant state of this PR. > > Since things have settled and the CSR approved, I'll

Re: RFR: 8354273: Replace even more Unicode characters with ASCII [v3]

2025-05-06 Thread Naoto Sato
On Tue, 6 May 2025 14:16:32 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to >> [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some >> additional places where unicode characters are unnecessarily used instead of >> pure ASCII. > > Magnus Ihse Bursie has updated the pull

Re: RFR: 8355249: Remove the use of WMIC from the entire source code [v2]

2025-05-06 Thread Alexey Semenyuk
On Tue, 22 Apr 2025 07:41:43 GMT, Daishi Tabata wrote: >> After searching the entire JDK source code, I found that WMIC is only used >> in four files. These WMIC calls can be replaced with PowerShell for WMI. >> >> The primary challenge in this replacement is to make it work the same as >> bef

Re: RFR: 8354968: Replace unicode sequences in comment text with UTF-8 characters [v2]

2025-05-06 Thread Magnus Ihse Bursie
> As part of the UTF-8 cleaning up done in > [JDK-8301971](https://bugs.openjdk.org/browse/JDK-8301971), I looked at where > and how we are using unicode sequences (`\u`). In several string > literals, I think the unicode sequences still has merit, if they improve > clarity or readability o

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v4]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 06:36:57 GMT, Jaikiran Pai wrote: >> Enum.valueOf -> Class.enumConstantDirectory -> Class.getEnumConstantsShared >> -> Method.invoke -> >> MethodHandleAccessorFactory.makeSpecializedTarget(isStatic = true) -> >> MethodHandles.dropArguments -> LambdaForm.editor -> bytecode ge

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v5]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 11:56:04 GMT, Per Minborg wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review remarks > > src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java > line 81: > >> 79: >> 80:

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v5]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 12:07:46 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/util/OperatingSystem.java line 88: >> >>> 86: >>> 87: // The current OperatingSystem >>> 88: private static @Stable OperatingSystem CURRENT_OS; >> >> Could this be a `StableValue.supplier()`?

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v5]

2025-05-06 Thread Chen Liang
On Tue, 6 May 2025 09:35:16 GMT, Shaojin Wen wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review remarks > > src/java.base/share/classes/jdk/internal/foreign/abi/CapturableState.java > line 59: > >> 57:

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v7]

2025-05-06 Thread Chen Liang
> Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous patch affected the toString display of the option; I

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Jaikiran Pai
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v16]

2025-05-06 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 BufferedReader; simplify Reader changes removing overridable self-call; update test - Changes

Re: RFR: 8354273: Replace even more Unicode characters with ASCII [v3]

2025-05-06 Thread Magnus Ihse Bursie
On Tue, 6 May 2025 14:16:32 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to >> [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some >> additional places where unicode characters are unnecessarily used instead of >> pure ASCII. > > Magnus Ihse Bursie has updated the pull

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v2]

2025-05-06 Thread Daniel Fuchs
On Tue, 6 May 2025 14:40:46 GMT, Per Minborg wrote: >> This sketch shows how "Stable Updaters" can be used to create stable >> computations of `@Stable` fields. Only one updater is needed per class, >> similar to `AtomicIntegerFieldUpdater`. > > Per Minborg has updated the pull request incremen

Re: RFR: 8301971: Make JDK source code UTF-8 [v5]

2025-05-06 Thread Magnus Ihse Bursie
> Most of the JDK code base has been transitioned to UTF-8, but not all. This > has recently become an acute problem, since our mixing of iso-8859-1 and > utf-8 in properties files confused the version of `sed` that is shipped with > the new macOS 15.4. > > The fix is basically simple, and incl

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-05-06 Thread Magnus Ihse Bursie
On Wed, 16 Apr 2025 10:35:02 GMT, Matthias Baesken wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Also document UTF-8 requirements (solves JDK-8338973) >> - Let configure only accept utf-8 locales >> -

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 15:19:09 GMT, Johannes Graham wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > > src/java.base/share/classes/java/

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Jaikiran Pai
On Tue, 6 May 2025 15:07:25 GMT, Roger Riggs wrote: > > I see that in the proposed changes, we are now using the same names for > > these local variables and method parameters as the field names. Would using > > different names for these local variables be better? To avoid shadowing the > > fi

Re: RFR: 8301971: Make JDK source code UTF-8 [v4]

2025-05-06 Thread Magnus Ihse Bursie
> Most of the JDK code base has been transitioned to UTF-8, but not all. This > has recently become an acute problem, since our mixing of iso-8859-1 and > utf-8 in properties files confused the version of `sed` that is shipped with > the new macOS 15.4. > > The fix is basically simple, and incl

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:59:40 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > > test/jdk/java/lang/StringBuilder/Str

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Johannes Graham
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Roger Riggs
> Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is to read and write AbstractStringBuilder fields > once using locals fo

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-05-06 Thread Magnus Ihse Bursie
On Thu, 17 Apr 2025 16:26:59 GMT, Naoto Sato wrote: >>> We will probably need to make sure things are ok on Windows as well (they >>> are the other confusing environment) >> >> Windows is much more painful to work with, since there is no correspondence >> of `LC_ALL`; you must set the user's l

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:03:37 GMT, Jaikiran Pai wrote: > I see that in the proposed changes, we are now using the same names for these > local variables and method parameters as the field names. Would using > different names for these local variables be better? To avoid shadowing the > field nam

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 01:38:21 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > > src/java.base/share/classes/java/lan

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v2]

2025-05-06 Thread Per Minborg
> This sketch shows how "Stable Updaters" can be used to create stable > computations of `@Stable` fields. Only one updater is needed per class, > similar to `AtomicIntegerFieldUpdater`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v5]

2025-05-06 Thread Roger Riggs
On Mon, 5 May 2025 17:29:33 GMT, Raffaello Giulietti wrote: >> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Increased min heap size to 8G. Looks good,

Re: RFR: 8356126: Duplication handling and optimization of CaptureCallState [v6]

2025-05-06 Thread Chen Liang
> Credit to @lukellmann that the duplication arg handling in #24742 avoided > throwing exceptions but produced a wrong option. This patch fixes that and > removed stream usages in CaptureCallState to speed up bootstrap. > > Also, the previous patch affected the toString display of the option; I

Integrated: 8355979: ATTRIBUTE_NO_UBSAN needs to be extended to handle float divisions by zero on AIX

2025-05-06 Thread Matthias Baesken
On Wed, 30 Apr 2025 13:04:18 GMT, Matthias Baesken wrote: > Seems the currently used ATTRIBUTE_NO_UBSAN does not handle the exclusion of > float divisions by zero. > At least this is the case on AIX. > > (seen in the jtreg test java/lang/Math/PowTests.java ) This pull request has now been inte

Re: RFR: 8354273: Replace even more Unicode characters with ASCII [v3]

2025-05-06 Thread Magnus Ihse Bursie
> As a follow-up to [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), > I found some additional places where unicode characters are unnecessarily > used instead of pure ASCII. Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The increm

  1   2   >